GNU bug report logs - #34860
Probing broken symlinks always involves errors

Previous Next

Package: guile;

Reported by: Tim Gesthuizen <tim.gesthuizen <at> yahoo.de>

Date: Thu, 14 Mar 2019 19:56:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#34860: closed (Probing broken symlinks always involves errors)
Date: Sun, 30 Jun 2019 19:55:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 30 Jun 2019 21:54:04 +0200
with message-id <87v9wmrgrn.fsf <at> gnu.org>
and subject line Re: bug#34860: Probing broken symlinks always involves errors
has caused the debbugs.gnu.org bug report #34860,
regarding Probing broken symlinks always involves errors
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
34860: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34860
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Tim Gesthuizen <tim.gesthuizen <at> yahoo.de>
To: bug-guile <at> gnu.org
Subject: Probing broken symlinks always involves errors
Date: Thu, 14 Mar 2019 20:50:57 +0100
Hi,
I wrote a little application that tries to probe whether a symlink
exists. The `stat` function has an undocumented optional parameter that
lets stat return #f when the file does not exist. With this argument one
can probe for any files excluding broken symlinks.
lstat does not offer this argument. Therefore I needed to use
guard-expressions around lstat to probe for broken symlinks.

So probing broken symlinks relies on errors in the control flow and is
not straight forward. Maybe we should add the optional argument that
`stat` has and document the arguments for both commands.

I am using guile 2.2.4.

Tim.


[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Tim Gesthuizen <tim.gesthuizen <at> yahoo.de>
Cc: Mark H Weaver <mhw <at> netris.org>, 34860-done <at> debbugs.gnu.org
Subject: Re: bug#34860: Probing broken symlinks always involves errors
Date: Sun, 30 Jun 2019 21:54:04 +0200
Hi Tim,

Tim Gesthuizen <tim.gesthuizen <at> yahoo.de> skribis:

> Mark H Weaver writes:
>> Anyway, I'm inclined to simply suggest using 'false-if-exception'.
>>
>> What do you think?
>
> I'm fine with this solution. My point was more about lowering the entry
> barrier for beginners than performance.
> If the change breaks ABI it is probably just not worth it.
>
> From my point of view we can close the ticket unless you want to keep it
> open until the documentation for stat is fixed.

Commit 63f54a7bc6adbc0f1b397872fb7eb96e84967ff1 updates the manual to
document the optional parameter of ‘stat’.

I think we can close the bug now.  :-)

Thanks,
Ludo’.


This bug report was last modified 5 years and 328 days ago.

Previous Next


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