[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a6a9b30: Fix moving files with duplicate names to trash-can
From: |
Eli Zaretskii |
Subject: |
master a6a9b30: Fix moving files with duplicate names to trash-can |
Date: |
Sat, 16 Nov 2019 07:56:17 -0500 (EST) |
branch: master
commit a6a9b3061f90313dfc58e3aa85d60c0a966b50dd
Author: Shingo Tanaka <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix moving files with duplicate names to trash-can
* lisp/files.el (move-file-to-trash): Fix file name in
trash-can when another deleted file under the same name is
already stored there. (Bug#37922)
Copyright-paperwork-exempt: yes.
---
lisp/files.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index 448e00c..bb77dcb 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7711,7 +7711,8 @@ Otherwise, trash FILENAME using the freedesktop.org
conventions,
(setq info-fn (make-temp-file
(expand-file-name files-base trash-info-dir)
nil ".trashinfo"))
- (setq files-base (file-name-nondirectory info-fn))
+ (setq files-base (substring (file-name-nondirectory info-fn)
+ 0 (- (length ".trashinfo"))))
(write-region nil nil info-fn nil 'quiet info-fn)))
;; Finally, try to move the file to the trashcan.
(let ((delete-by-moving-to-trash nil)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a6a9b30: Fix moving files with duplicate names to trash-can,
Eli Zaretskii <=