summaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-11-12 17:54:31 -0500
committerDavid Robillard <d@drobilla.net>2022-11-16 10:22:55 -0500
commit9d5c526e264e2fe13f8b579528da21b54c65ab9e (patch)
tree4f42f501df44ca91c5669515888079355d99c7c7 /src/state.c
parent07a05e6edbf20016836a7c47d8cb8102fbfed86b (diff)
downloadlilv-9d5c526e264e2fe13f8b579528da21b54c65ab9e.tar.gz
lilv-9d5c526e264e2fe13f8b579528da21b54c65ab9e.tar.bz2
lilv-9d5c526e264e2fe13f8b579528da21b54c65ab9e.zip
Use zix_path_lexically_relative()
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/state.c b/src/state.c
index 571a591..d98b80b 100644
--- a/src/state.c
+++ b/src/state.c
@@ -284,10 +284,10 @@ abstract_path(LV2_State_Map_Path_Handle handle, const char* abs_path)
if (lilv_path_is_child(real_path, state->dir)) {
// File in state directory (loaded, or created by plugin during save)
- path = lilv_path_relative_to(real_path, state->dir);
+ path = zix_path_lexically_relative(NULL, real_path, state->dir);
} else if (lilv_path_is_child(real_path, state->scratch_dir)) {
// File created by plugin earlier
- path = lilv_path_relative_to(real_path, state->scratch_dir);
+ path = zix_path_lexically_relative(NULL, real_path, state->scratch_dir);
if (state->copy_dir) {
ZixStatus st = zix_create_directories(NULL, state->copy_dir);
if (st) {
@@ -1220,7 +1220,7 @@ lilv_state_make_links(const LilvState* state, const char* dir)
}
// Make a link in the save directory to the external link
- char* target = lilv_path_relative_to(lpath, dir);
+ char* target = zix_path_lexically_relative(NULL, lpath, dir);
maybe_symlink(lpath, path);
free(target);
free(lpath);