]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some annoyances wrt file-name-non-special
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 7 May 2021 12:31:17 +0000 (14:31 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 7 May 2021 12:31:17 +0000 (14:31 +0200)
* lisp/files.el (file-name-non-special): Do not expand `file-truename'.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use local `default-directory' for `start-process'.

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

index 27074beffc166af92564f9aa6dba1dd1e7f1dec1..93a0e07aba0b774ea8bc3d350c25f4e6dd4c42e6 100644 (file)
@@ -7559,7 +7559,10 @@ only these files will be asked to be saved."
        (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)))
index 57be9ecf006fcc99bb490667896789387b0ad8de..3ce74a2cf1a056a7207e12cc78bdaddd86176400 100644 (file)
@@ -2371,11 +2371,12 @@ The method used must be an out-of-band method."
                 ;; 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)