* net/tramp.el (tramp-action-out-of-band): Read pending output.
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 17 Mar 2014 09:28:47 +0000 (10:28 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 17 Mar 2014 09:28:47 +0000 (10:28 +0100)
(tramp-call-process): Trace also DESTINATION.

* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Quote file names when they are local.  Remove superfluous trace.

lisp/ChangeLog
lisp/net/tramp-sh.el
lisp/net/tramp.el

index b3f9a90..2946ac5 100644 (file)
@@ -1,3 +1,11 @@
+2014-03-17  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-action-out-of-band): Read pending output.
+       (tramp-call-process): Trace also DESTINATION.
+
+       * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
+       Quote file names when they are local.  Remove superfluous trace.
+
 2014-03-17  Dmitry Gutov  <dgutov@yandex.ru>
 
        * newcomment.el (comment-beginning): If `comment-start-skip'
index ee37373..245d4f1 100644 (file)
@@ -2246,7 +2246,9 @@ The method used must be an out-of-band method."
        (aset v 3 localname)
 
        ;; Check which ones of source and target are Tramp files.
-       (setq source (if t1 (tramp-make-copy-program-file-name v) filename)
+       (setq source (if t1
+                        (tramp-make-copy-program-file-name v)
+                      (shell-quote-argument filename))
              target (funcall
                      (if (and (file-directory-p filename)
                               (string-equal
@@ -2254,7 +2256,9 @@ The method used must be an out-of-band method."
                                (file-name-nondirectory newname)))
                          'file-name-directory
                        'identity)
-                     (if t2 (tramp-make-copy-program-file-name v) newname)))
+                     (if t2
+                         (tramp-make-copy-program-file-name v)
+                       (shell-quote-argument newname))))
 
        ;; Check for host and port number.  We cannot use
        ;; `tramp-file-name-port', because this returns also
@@ -2376,7 +2380,6 @@ The method used must be an out-of-band method."
                     (buffer-substring (point-min) (point-at-eol))))))
 
            ;; Reset the transfer process properties.
-           (tramp-message orig-vec 6 "\n%s" (buffer-string))
            (tramp-set-connection-property v "process-name" nil)
            (tramp-set-connection-property v "process-buffer" nil)))
 
index face017..5ff68e0 100644 (file)
@@ -3468,6 +3468,8 @@ The terminal type can be configured with `tramp-terminal-type'."
 
 (defun tramp-action-out-of-band (proc vec)
   "Check, whether an out-of-band copy has finished."
+  ;; There might be pending output for the exit status.
+  (tramp-accept-process-output proc 0.1)
   (cond ((and (memq (process-status proc) '(stop exit))
              (zerop (process-exit-status proc)))
         (tramp-message vec 3 "Process has finished.")
@@ -4092,7 +4094,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1.
 Furthermore, traces are written with verbosity of 6."
   (tramp-message
    (vector tramp-current-method tramp-current-user tramp-current-host nil nil)
-   6 "`%s %s' %s" program (mapconcat 'identity args " ") infile)
+   6 "`%s %s' %s %s" program (mapconcat 'identity args " ") infile destination)
   (if (executable-find program)
       (apply 'call-process program infile destination display args)
     1))
@@ -4229,7 +4231,7 @@ T1 and T2 are time values (as returned by `current-time' for example)."
 ;; This function should produce a string which is grokked by a Unix
 ;; shell, even if the Emacs is running on Windows.  Since this is the
 ;; kludges section, we bind `system-type' in such a way that
-;; `shell-quote-arguments'  behaves as if on Unix.
+;; `shell-quote-argument' behaves as if on Unix.
 ;;
 ;; Thanks to Mario DeWeerd for the hint that it is sufficient for this
 ;; function to work with Bourne-like shells.