fs-util: use path_make_relative_parent() at one more place

This commit is contained in:
Yu Watanabe
2022-09-14 06:22:09 +09:00
parent c9bc7a449c
commit 449375d2ad
+1 -7
View File
@@ -406,13 +406,7 @@ int symlink_idempotent(const char *from, const char *to, bool make_relative) {
assert(to);
if (make_relative) {
_cleanup_free_ char *parent = NULL;
r = path_extract_directory(to, &parent);
if (r < 0)
return r;
r = path_make_relative(parent, from, &relpath);
r = path_make_relative_parent(to, from, &relpath);
if (r < 0)
return r;