Subject: bug#49711: 27.2; Deleting a directory called ~ deletes home directory

From: Eli Zaretskii <[email-masked]>
Date: Sat, 24 Jul 2021 15:17:35 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Sat, 24 Jul 2021 13:37:49 +0200
> Cc: [email-masked]
> 
> Al Haji-Ali <[email-masked]> writes:
> 
> > Apologies, I should have specified that I have
> > `delete-by-moving-to-trash` set to `t`.
> > Otherwise, the exact steps you mentioned reproduce this for me on 27.2
> 
> Ah, yes, with that setting I can reproduce the problem.  This is now
> fixed in Emacs 28.

Hmm... you replaced expand-file-name with directory-append, but what
if there's a real "~" in the arguments, or some ".." etc. stuff?  That
would now wind up in the trash info, no?

Wouldn't it be better to quote "~" when it's a literal file name?