GNU bug report logs - #58721
28.2; dired with delete-by-moving-to-trash can't trash directory twice

Previous Next

Package: emacs;

Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>

Date: Sat, 22 Oct 2022 18:24:01 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #92 received at 58721 <at> debbugs.gnu.org (full text, mbox):

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58721 <at> debbugs.gnu.org, gusbrs.2016 <at> gmail.com
Subject: Re: bug#58721: 28.2;
 dired with delete-by-moving-to-trash can't trash directory twice
Date: Sun, 30 Oct 2022 11:18:29 -0700
Eli Zaretskii wrote:

> Looks good, but maybe add to the comment the reason _why_ we don't use
> rename-file for directories.  You explained _what_ we do, but not
> _why_.

Do you mean something like

-----8<-----8<-----
Fix cross-filesystem directory trashing (Bug#58721)

* lisp/files.el (move-file-to-trash): When trashing a directory,
copy it into the trash folder and then delete it, rather than
using rename-file.  rename-file can only be used when the
to-be-trashed directory and the trashcan live in the same filesystem;
this approach handles both that case and the different-filesystem case.
----->8----->8-----

?

mike




This bug report was last modified 2 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.