1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Minor cleanup in tramp-gvfs-handle-file-local-copy

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-local-copy):
Move error message up.
This commit is contained in:
Michael Albinus 2017-11-25 16:09:55 +01:00
parent 55c5b12fa0
commit a8664cc998

View 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
(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))
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(copy-file filename tmpfile 'ok-if-already-exists 'keep-time)
tmpfile)))