summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-10 22:25:50 +0000
committerDavid Robillard <d@drobilla.net>2012-03-10 22:25:50 +0000
commit33476f6e09315fca3bbf08fd87cef991309a3cbc (patch)
tree6e0aaf233eb3680c1c26d699922a7f99451bbffa /src
parentbdaa153e48ab2bd38a76474acca85ff48463ea33 (diff)
downloadlilv-33476f6e09315fca3bbf08fd87cef991309a3cbc.tar.gz
lilv-33476f6e09315fca3bbf08fd87cef991309a3cbc.tar.bz2
lilv-33476f6e09315fca3bbf08fd87cef991309a3cbc.zip
Tolerate nonexistent paths in lilv_realpath.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4043 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 9e55393..a3109f7 100644
--- a/src/util.c
+++ b/src/util.c
@@ -406,7 +406,8 @@ lilv_realpath(const char* path)
GetFullPathName(path, MAX_PATH, out, NULL);
return out;
#else
- return realpath(path, NULL);
+ char* real_path = realpath(path, NULL);
+ return real_path ? real_path : lilv_strdup(path);
#endif
}