mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 18:37:33 +00:00
* files.el (move-file-to-trash): Preserve default file modes on error.
This commit is contained in:
parent
b9110d6a11
commit
6bb72cbd8b
2 changed files with 12 additions and 6 deletions
|
|
@ -1,3 +1,7 @@
|
|||
2011-12-29 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* files.el (move-file-to-trash): Preserve default file modes on error.
|
||||
|
||||
2011-12-29 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property
|
||||
|
|
|
|||
|
|
@ -6457,12 +6457,14 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
|
|||
|
||||
;; Ensure that the trash directory exists; otherwise, create it.
|
||||
(let ((saved-default-file-modes (default-file-modes)))
|
||||
(set-default-file-modes ?\700)
|
||||
(unless (file-exists-p trash-files-dir)
|
||||
(make-directory trash-files-dir t))
|
||||
(unless (file-exists-p trash-info-dir)
|
||||
(make-directory trash-info-dir t))
|
||||
(set-default-file-modes saved-default-file-modes))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(set-default-file-modes #o700)
|
||||
(unless (file-exists-p trash-files-dir)
|
||||
(make-directory trash-files-dir t))
|
||||
(unless (file-exists-p trash-info-dir)
|
||||
(make-directory trash-info-dir t)))
|
||||
(set-default-file-modes saved-default-file-modes)))
|
||||
|
||||
;; Try to move to trash with .trashinfo undo information
|
||||
(save-excursion
|
||||
|
|
|
|||
Loading…
Reference in a new issue