GNU bug report logs - #76678
31.0.50; Can't trash broken links

Previous Next

Package: emacs;

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

Date: Sun, 2 Mar 2025 09:36:01 UTC

Severity: normal

Found in version 31.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 76678 <at> debbugs.gnu.org, the_wurfkreuz <the_wurfkreuz <at> proton.me>
Subject: Re: bug#76678: 31.0.50; Can't trash broken links
Date: Tue, 4 Mar 2025 01:54:06 -0800
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Hi Stefan,
>
>> Michael, could you please take a look at this?
>
> I'm working already on this for two days. It is simple to reproduce, and
> I have already extended tramp-tests.el for this case. This helps me also
> debugging.
>
> However, the fix isn't easy. Finally, the problem is a subtle behavior
> of file-exists-p. If it is called with a symlinked file, valid target,
> it returns t. If the target doesn't exist, it returns nil.
>
> The Tramp implementation returns always t, whether the target exists
> or not. Wrong.

Subtle behaviour, indeed.

> I've fixed tramp-sh-handle-file-exists-p accordingly. But now, since
> file-exists-p is used everywhere in Tramp, I must test everything.
> Sometimes the changed implementation results in new errors, and I must
> change code to '(or (file-exists-p filename) (file-symlinkp
> filename))' at places, which have used a simple '(file-exists-p
> filename)' before.
>
> This will take time.

Thanks for looking into this.




This bug report was last modified 67 days ago.

Previous Next


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