]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Set
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 27 Jan 2007 14:40:08 +0000 (14:40 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 27 Jan 2007 14:40:08 +0000 (14:40 +0000)
default-directory to a sane value when calling start-process.

lisp/ChangeLog
lisp/net/tramp.el

index 4bf785d5b1aea3e004f604600163f99045e75d3e..613bd9e6bcd2756e6c02ac0c8b9c8ef8069b5526 100644 (file)
@@ -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.
index 5625072a15528fddb58c8e6a178a052592444e5a..257fbc4e47bb5b917b97ee28ad2cb934a4a37689 100644 (file)
@@ -3245,8 +3245,13 @@ be a local filename.  The method used must be an out-of-band method."
 
       ;; 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))