fs-util: use path_make_relative_parent() at one more place
This commit is contained in:
+1
-7
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user