[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3f8b303: Fix bug when moving directories to trash
From: |
Lars Ingebrigtsen |
Subject: |
master 3f8b303: Fix bug when moving directories to trash |
Date: |
Mon, 24 May 2021 18:25:07 -0400 (EDT) |
branch: master
commit 3f8b303ec087ba3d0bd524c7fc8c628ef15a3e4a
Author: Gregory Heytings <gregory@heytings.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix bug when moving directories to trash
* lisp/files.el (move-file-to-trash): Pass the correct dir-flag to
make-temp-file so that a directory is created when a directory is
being trashed (Bug#47960).
---
lisp/files.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index 4fdafe1..62e1702 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7945,6 +7945,7 @@ 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))
(overwrite nil)
info-fn)
;; We're checking further down whether the info file
@@ -7956,7 +7957,8 @@ Otherwise, trash FILENAME using the freedesktop.org
conventions,
files-base (file-name-nondirectory
(make-temp-file
(expand-file-name
- files-base trash-files-dir)))))
+ files-base trash-files-dir)
+ is-directory))))
(setq info-fn (expand-file-name
(concat files-base ".trashinfo")
trash-info-dir))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3f8b303: Fix bug when moving directories to trash,
Lars Ingebrigtsen <=