*** /tmp/ediffDAueJg 2022-01-15 20:40:02.604224925 +0100 --- /home/albinus/src/tramp/lisp/tramp-sshfs.el 2022-01-15 20:36:50.765907615 +0100 *************** *** 243,254 **** (format "cd %s && exec %s" localname ! (mapconcat #'tramp-shell-quote-argument (cons program args) " ")))) (unwind-protect (apply #'tramp-call-process v (tramp-get-method-parameter v 'tramp-login-program) ! infile destination display (tramp-expand-args v 'tramp-login-args ?h (or (tramp-file-name-host v) "") --- 243,269 ---- (format "cd %s && exec %s" localname ! (mapconcat #'tramp-shell-quote-argument (cons program args) " "))) ! input tmpinput) ! ! ;; Determine input. ! (if (null infile) ! (setq input (tramp-get-remote-null-device v)) ! (setq infile (expand-file-name infile)) ! (if (tramp-equal-remote default-directory infile) ! ;; INFILE is on the same remote host. ! (setq input (tramp-file-local-name infile)) ! ;; INFILE must be copied to remote host. ! (setq input (tramp-make-tramp-temp-file v) ! tmpinput (tramp-make-tramp-file-name v input 'nohop)) ! (copy-file infile tmpinput t))) ! (when input (setq command (format "%s <%s" command input))) ! (unwind-protect (apply #'tramp-call-process v (tramp-get-method-parameter v 'tramp-login-program) ! nil destination display (tramp-expand-args v 'tramp-login-args ?h (or (tramp-file-name-host v) "") *************** *** 256,261 **** --- 271,281 ---- ?p (or (tramp-file-name-port v) "") ?l command)) + ;; Cleanup. We remove all file cache values for the + ;; connection, because the remote process could have changed + ;; them. + (when tmpinput (delete-file tmpinput)) + (unless process-file-side-effects (tramp-flush-directory-properties v ""))))))