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:
parent
55c5b12fa0
commit
a8664cc998
1 changed files with 4 additions and 4 deletions
|
@ -1056,11 +1056,11 @@ If FILE-SYSTEM is non-nil, return file system attributes."
|
||||||
(defun tramp-gvfs-handle-file-local-copy (filename)
|
(defun tramp-gvfs-handle-file-local-copy (filename)
|
||||||
"Like `file-local-copy' for Tramp files."
|
"Like `file-local-copy' for Tramp files."
|
||||||
(with-parsed-tramp-file-name filename nil
|
(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)))
|
(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)
|
(copy-file filename tmpfile 'ok-if-already-exists 'keep-time)
|
||||||
tmpfile)))
|
tmpfile)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue