diff options
author | David Robillard <d@drobilla.net> | 2020-12-18 17:05:57 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-18 17:39:05 +0100 |
commit | 840392eb0d7b7b81cc75955d113fe71d9684fda2 (patch) | |
tree | ceb8db087f43277e09a8f970f0ae38ca0b802ada | |
parent | fe55575fc73190568c6899e1b69f37037942daff (diff) | |
download | lilv-840392eb0d7b7b81cc75955d113fe71d9684fda2.tar.gz lilv-840392eb0d7b7b81cc75955d113fe71d9684fda2.tar.bz2 lilv-840392eb0d7b7b81cc75955d113fe71d9684fda2.zip |
Windows: Fix determining state filenames from backslashey paths
-rw-r--r-- | src/state.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index 57a5783..97709d3 100644 --- a/src/state.c +++ b/src/state.c @@ -307,11 +307,12 @@ abstract_path(LV2_State_Map_Path_Handle handle, } } else if (state->link_dir) { // New path outside state directory, make a link - const char* slash = strrchr(real_path, '/'); - const char* name = slash ? (slash + 1) : real_path; + char* const name = lilv_path_filename(real_path); // Find a free name in the (virtual) state directory path = lilv_find_free_path(name, lilv_state_has_path, state); + + free(name); } else { // No link directory, preserve absolute path path = lilv_strdup(abs_path); |