aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net/tramp-sudoedit.el
diff options
context:
space:
mode:
authorMichael Albinus2019-11-04 17:34:31 +0100
committerMichael Albinus2019-11-04 17:34:31 +0100
commitdd19cc3aa16ccc441a8a2bfcdeb3005a6eef2543 (patch)
tree42bd79ad2020a595244d981f0598b6e4595191bc /lisp/net/tramp-sudoedit.el
parenta256e03bd944384efb3da05858264a5d3b72462d (diff)
downloademacs-dd19cc3aa16ccc441a8a2bfcdeb3005a6eef2543.tar.gz
emacs-dd19cc3aa16ccc441a8a2bfcdeb3005a6eef2543.zip
Improve Tramp error handling
* lisp/net/tramp.el (tramp-set-syntax): Add missing argument. (tramp-signal-hook-function): Make it more robust. (tramp-handle-directory-files): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-copy-file, tramp-adb-handle-rename-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Improve error handling. * test/lisp/net/tramp-tests.el (tramp-test11-copy-file) (tramp-test12-rename-file, tramp-test14-delete-directory) (tramp-test15-copy-directory, tramp-test16-directory-files) (tramp-test19-directory-files-and-attributes): Extend tests.
Diffstat (limited to 'lisp/net/tramp-sudoedit.el')
-rw-r--r--lisp/net/tramp-sudoedit.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index bfc9b3bdc3a..2d9d7ff7892 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -241,6 +241,10 @@ absolute file names."
241 (msg-operation (if (eq op 'copy) "Copying" "Renaming"))) 241 (msg-operation (if (eq op 'copy) "Copying" "Renaming")))
242 242
243 (with-parsed-tramp-file-name (if t1 filename newname) nil 243 (with-parsed-tramp-file-name (if t1 filename newname) nil
244 (unless (file-exists-p filename)
245 (tramp-error
246 v tramp-file-missing
247 "%s file" msg-operation "No such file or directory" filename))
244 (when (and (not ok-if-already-exists) (file-exists-p newname)) 248 (when (and (not ok-if-already-exists) (file-exists-p newname))
245 (tramp-error v 'file-already-exists newname)) 249 (tramp-error v 'file-already-exists newname))
246 (when (and (file-directory-p newname) 250 (when (and (file-directory-p newname)