GNU bug report logs - #74674
30.0.91; Can't delete an empty symlink when trashing is enabled for root

Previous Next

Package: emacs;

Reported by: the_wurfkreuz <the_wurfkreuz <at> proton.me>

Date: Tue, 3 Dec 2024 19:54:02 UTC

Severity: normal

Found in version 30.0.91

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: the_wurfkreuz <the_wurfkreuz <at> proton.me>, 74674 <at> debbugs.gnu.org
Cc: Jim Porter <jporterbugs <at> gmail.com>
Subject: bug#74674: 30.0.91; Can't delete an empty symlink when trashing is enabled for root
Date: Sun, 8 Dec 2024 20:49:01 -0500
the_wurfkreuz via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> If I evaluate the code to enable trashing for root and try to delete an empty symbolic link from Eshell, I get:
> File is missing: /path/to/link
>
> Steps to reproduce:
>
> 1. emacs -Q
> 2. M-: (connection-local-set-profile-variables 'remote-trash-directory '((trash-directory . "/sudo::~/.local/share/trash/")))
> 3. M-: (connection-local-set-profiles `(:application tramp :protocol "sudo" :machine ,(system-name)) 'remote-trash-directory)
> 4. M-x eshell
> 5. (require 'em-tramp)
> 6. (setq delete-by-moving-to-trash t)
> 7. sudo touch /usr/local/bin/test-file
> 8. ln -s /sudo::/usr/local/bin/test-file /sudo::/usr/local/bin/test-file-line
> 9. sudo rm /usr/local/bin/test-file
> 10. sudo rm /usr/local/bin/test-file-line
>
> "File is missing: /usr/local/bin/test-file-link".
>
> Expected behavior:
>
> I'm able to delete it.

I'm copying in Jim Porter.




This bug report was last modified 165 days ago.

Previous Next


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