bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58721: 28.2; dired with delete-by-moving-to-trash can't trash direct


From: Gustavo Barros
Subject: bug#58721: 28.2; dired with delete-by-moving-to-trash can't trash directory twice
Date: Sun, 30 Oct 2022 20:10:04 -0300

On Sun, 30 Oct 2022 at 19:20, Mike Kupfer <mkupfer@alum.berkeley.edu> wrote:

> Well, it turns out I hadn't tested my previous patch enough.  It handled
> the first deletion of directory foo, but not subsequent deletions (which
> was the entire point of the fix, sigh).  I've attached another patch.
> I took a stab at improving the commenting in the code while I was
> there.

I may be wrong but, as far as my reading goes, I think this might
misbehave if the "directory" is a symlink. `is-directory' is built as
`(file-directory-p fn)' which returns t even if it is a symlink to a
directory. Would things such as `copy-directory` (with `copy-contents`
arg t) and `delete-directory' work just as well in such a case?

Besides that, in general, imho I cannot think of this issue as
something else other than a misbehavior of `rename-file', so that the
patch in these terms feels like a workaround. I understand Eli
disagrees. True, most likely this is just a muggle (me) being naive,
so I'll try to watch and learn.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]