mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
fs-util: port symlink_idempotent() to path_extract_directory()
This commit is contained in:
parent
9ca6d78061
commit
9813d8354c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user