(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 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'
(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
(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
(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)))
(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.")
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))
;; 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.