--- Begin Message ---
Subject: |
Probing broken symlinks always involves errors |
Date: |
Thu, 14 Mar 2019 20:50:57 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
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.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#34860: Probing broken symlinks always involves errors |
Date: |
Sun, 30 Jun 2019 21:54:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Hi Tim,
Tim Gesthuizen <address@hidden> 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’.
--- End Message ---