]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor cleanup in tramp-gvfs-handle-file-local-copy
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 25 Nov 2017 15:09:55 +0000 (16:09 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 25 Nov 2017 15:09:55 +0000 (16:09 +0100)
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-local-copy):
Move error message up.

lisp/net/tramp-gvfs.el

index 424e77b0eba0ffc5318adb3d777ce692b0e0d1c2..404af983b50693582435aa86bc5e17b33acdd6a6 100644 (file)
@@ -1056,11 +1056,11 @@ If FILE-SYSTEM is non-nil, return file system attributes."
 (defun tramp-gvfs-handle-file-local-copy (filename)
   "Like `file-local-copy' for Tramp files."
   (with-parsed-tramp-file-name filename nil
+    (unless (file-exists-p filename)
+      (tramp-error
+       v tramp-file-missing
+       "Cannot make local copy of non-existing file `%s'" filename))
     (let ((tmpfile (tramp-compat-make-temp-file filename)))
-      (unless (file-exists-p filename)
-       (tramp-error
-        v tramp-file-missing
-        "Cannot make local copy of non-existing file `%s'" filename))
       (copy-file filename tmpfile 'ok-if-already-exists 'keep-time)
       tmpfile)))