bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34860: Probing broken symlinks always involves errors


From: Tim Gesthuizen
Subject: bug#34860: 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]