diff options
author | David Robillard <d@drobilla.net> | 2019-04-15 21:34:04 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-15 23:03:12 +0200 |
commit | 90e5c98edaf99c01ec3f6c7dfd1174628b6fbaa8 (patch) | |
tree | cbae965be559a056f7c08ecf5d26ea68c80b60f3 | |
parent | e688e49e365b9c62426c11fa92698c45d615cb02 (diff) | |
download | lilv-90e5c98edaf99c01ec3f6c7dfd1174628b6fbaa8.tar.gz lilv-90e5c98edaf99c01ec3f6c7dfd1174628b6fbaa8.tar.bz2 lilv-90e5c98edaf99c01ec3f6c7dfd1174628b6fbaa8.zip |
Fix lilv_mkdir_p when used with forward slashes on Windows
-rw-r--r-- | src/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -587,13 +587,14 @@ lilv_mkdir_p(const char* dir_path) #endif for (; i <= path_len; ++i) { - if (path[i] == LILV_DIR_SEP[0] || path[i] == '\0') { + const char c = path[i]; + if (c == LILV_DIR_SEP[0] || c == '/' || c == '\0') { path[i] = '\0'; if (mkdir(path, 0755) && errno != EEXIST) { free(path); return errno; } - path[i] = LILV_DIR_SEP[0]; + path[i] = c; } } |