diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2020-11-01 12:42:29 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2020-11-01 12:42:29 +0100 |
commit | 06585bb939ed61574a4b79455c58cab02f11f0fc (patch) | |
tree | 551e326730405ce7d0d9b3122fa215ac1d0b0765 /lisp/net/tramp-crypt.el | |
parent | 881eeeef9452c42a04f531a9ed18e7c254642a6b (diff) | |
download | emacs-06585bb939ed61574a4b79455c58cab02f11f0fc.tar.gz emacs-06585bb939ed61574a4b79455c58cab02f11f0fc.tar.bz2 emacs-06585bb939ed61574a4b79455c58cab02f11f0fc.zip |
Trash remote files to local trash (Bug#44216)
* doc/misc/tramp.texi (Frequently Asked Questions): Add trashing.
* lisp/net/tramp-adb.el (tramp-adb-handle-delete-directory)
(tramp-adb-handle-delete-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-delete-directory)
(tramp-sh-handle-delete-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory)
(tramp-smb-handle-delete-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-delete-directory)
(tramp-sudoedit-handle-delete-file): Implement local trash. (Bug#44216)
* lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-directory)
(tramp-crypt-handle-delete-file): Do not trash.
* lisp/net/tramp.el (tramp-skeleton-delete-directory): New defmacro.
* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
(tramp-test14-delete-directory): Add trashing.
Diffstat (limited to 'lisp/net/tramp-crypt.el')
-rw-r--r-- | lisp/net/tramp-crypt.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 3e96daa7b1f..286b60a48c2 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el @@ -651,21 +651,22 @@ absolute file names." (list filename newname ok-if-already-exists keep-date preserve-uid-gid preserve-extended-attributes)))) +;; Crypted files won't be trashed. (defun tramp-crypt-handle-delete-directory - (directory &optional recursive trash) + (directory &optional recursive _trash) "Like `delete-directory' for Tramp files." (with-parsed-tramp-file-name (expand-file-name directory) nil (tramp-flush-directory-properties v localname) (let (tramp-crypt-enabled) - (delete-directory - (tramp-crypt-encrypt-file-name directory) recursive trash)))) + (delete-directory (tramp-crypt-encrypt-file-name directory) recursive)))) -(defun tramp-crypt-handle-delete-file (filename &optional trash) +;; Crypted files won't be trashed. +(defun tramp-crypt-handle-delete-file (filename &optional _trash) "Like `delete-file' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (tramp-flush-file-properties v localname) (let (tramp-crypt-enabled) - (delete-file (tramp-crypt-encrypt-file-name filename) trash)))) + (delete-file (tramp-crypt-encrypt-file-name filename))))) (defun tramp-crypt-handle-directory-files (directory &optional full match nosort) "Like `directory-files' for Tramp files." |