summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-07-10 19:10:06 +0200
committerDavid Robillard <d@drobilla.net>2018-07-10 21:58:32 +0200
commit5e80e165754064e9942fdf7bd3449a9f4fa047a0 (patch)
tree6d409f9cc18907e821dafc6a909d1f9d36d657c3 /src
parentcfa27c5274499f9609a9d4c0c224f3d205aa7f4a (diff)
downloadlilv-5e80e165754064e9942fdf7bd3449a9f4fa047a0.tar.gz
lilv-5e80e165754064e9942fdf7bd3449a9f4fa047a0.tar.bz2
lilv-5e80e165754064e9942fdf7bd3449a9f4fa047a0.zip
Fix saving state when broken links are encountered
Diffstat (limited to 'src')
-rw-r--r--src/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 9e791b4..4973181 100644
--- a/src/util.c
+++ b/src/util.c
@@ -272,7 +272,12 @@ lilv_dirname(const char* path)
bool
lilv_path_exists(const char* path, void* ignored)
{
+#ifdef HAVE_LSTAT
+ struct stat st;
+ return !lstat(path, &st);
+#else
return !access(path, F_OK);
+#endif
}
char*