(setq file-arg-indices (cdr file-arg-indices))))
(pcase method
('identity (car arguments))
- ('add (file-name-quote (apply operation arguments) t))
+ ('add
+ ;; This is `file-truename'. We don't want file name handlers
+ ;; to expand this.
+ (file-name-quote (let (tramp-mode) (apply operation arguments)) t))
('buffer-file-name
(let ((buffer-file-name (file-name-unquote buffer-file-name t)))
(apply operation arguments)))
;; can be handled. We don't set a timeout, because
;; the copying of large files can last longer than 60
;; secs.
- p (apply
- #'start-process
- (tramp-get-connection-name v)
- (tramp-get-connection-buffer v)
- copy-program copy-args))
+ p (let ((default-directory (tramp-compat-temporary-file-directory)))
+ (apply
+ #'start-process
+ (tramp-get-connection-name v)
+ (tramp-get-connection-buffer v)
+ copy-program copy-args)))
(tramp-message orig-vec 6 "%s" (string-join (process-command p) " "))
(process-put p 'vector orig-vec)
(process-put p 'adjust-window-size-function #'ignore)