From: Michael Albinus Date: Sat, 25 Nov 2017 15:09:55 +0000 (+0100) Subject: Minor cleanup in tramp-gvfs-handle-file-local-copy X-Git-Tag: emacs-26.0.91~247 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8664cc9986be3a7d0ff4c46546ea1d9c906ab00;p=emacs.git Minor cleanup in tramp-gvfs-handle-file-local-copy * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-local-copy): Move error message up. --- diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 424e77b0eba..404af983b50 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -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)))