summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
}