projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95d827f
)
Fix trashing of symlink that points at a directory
author
Mike Kupfer
<mkupfer@alum.berkeley.edu>
Mon, 21 Nov 2022 00:44:20 +0000
(16:44 -0800)
committer
Eli Zaretskii
<eliz@gnu.org>
Thu, 24 Nov 2022 11:17:08 +0000
(13:17 +0200)
* lisp/files.el (move-file-to-trash): Redefine is-directory so
that it is false for symlinks.
lisp/files.el
patch
|
blob
|
history
diff --git
a/lisp/files.el
b/lisp/files.el
index 127cf77240f56f935f70468f6ebd926afd9cc33a..60c0eb917e55ac33292877e41143f96cfc973dd0 100644
(file)
--- a/
lisp/files.el
+++ b/
lisp/files.el
@@
-8566,7
+8566,8
@@
Otherwise, trash FILENAME using the freedesktop.org conventions,
;; Make a .trashinfo file. Use O_EXCL, as per trash-spec 1.0.
(let* ((files-base (file-name-nondirectory fn))
- (is-directory (file-directory-p fn))
+ (is-directory (and (file-directory-p fn)
+ (not (file-symlink-p fn))))
(overwrite nil)
info-fn)
;; We're checking further down whether the info file