changeset 75429:0d32395ff1eb

* net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Set default-directory to a sane value when calling start-process.
author Michael Albinus <michael.albinus@gmx.de>
date Sat, 27 Jan 2007 14:40:08 +0000
parents d19b2a81fa12
children 06172d4ae1d7
files lisp/ChangeLog lisp/net/tramp.el
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jan 27 13:52:16 2007 +0000
+++ b/lisp/ChangeLog	Sat Jan 27 14:40:08 2007 +0000
@@ -1,3 +1,8 @@
+2007-01-27  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Set
+	default-directory to a sane value when calling start-process.
+
 2007-01-27  Eli Zaretskii  <eliz@gnu.org>
 
 	* ls-lisp.el (ls-lisp-use-localized-time-format): New defcustom.
--- a/lisp/net/tramp.el	Sat Jan 27 13:52:16 2007 +0000
+++ b/lisp/net/tramp.el	Sat Jan 27 14:40:08 2007 +0000
@@ -3245,8 +3245,13 @@
 
       ;; Use rcp-like program for file transfer.
       (unwind-protect
-          (let ((p (apply 'start-process (buffer-name trampbuf) trampbuf
-                          copy-program copy-args)))
+          (let* ((default-directory
+		   (if (and (stringp default-directory)
+			    (file-accessible-directory-p default-directory))
+		       default-directory
+		     (tramp-temporary-file-directory)))
+		 (p (apply 'start-process (buffer-name trampbuf) trampbuf
+			   copy-program copy-args)))
             (tramp-set-process-query-on-exit-flag p nil)
             (tramp-process-actions p multi-method method user host
                                    tramp-actions-copy-out-of-band))