GNU bug report logs -
#76678
31.0.50; Can't trash broken links
Previous Next
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 #19 received at 76678-done <at> debbugs.gnu.org (full text, mbox):
Vesion: 30.2
Hi,
>> 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.
Finally, I've applied needed changes to all Tramp backends. Tests pass,
so I have pushed it to master.
Will also be available with next Tramp 2.7.2.3 later this month on GNU
ELPA. This is also planned for merge with the emacs-30 branch.
Closing the bug.
Best regards, Michael.
This bug report was last modified 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.