fs-util: port symlink_idempotent() to path_extract_directory()
This commit is contained in:
committed by
Luca Boccassi
parent
9ca6d78061
commit
9813d8354c
+3
-3
@@ -428,9 +428,9 @@ int symlink_idempotent(const char *from, const char *to, bool make_relative) {
|
||||
if (make_relative) {
|
||||
_cleanup_free_ char *parent = NULL;
|
||||
|
||||
parent = dirname_malloc(to);
|
||||
if (!parent)
|
||||
return -ENOMEM;
|
||||
r = path_extract_directory(to, &parent);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = path_make_relative(parent, from, &relpath);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user