chase-symlinks: prefer path_extract_directory() over dirname()

This commit is contained in:
Lennart Poettering
2022-04-12 17:10:50 +02:00
parent 860f4c6aa6
commit 57f9ca3aa0
+3 -3
View File
@@ -236,9 +236,9 @@ int chase_symlinks(
if (empty_or_root(done))
continue;
parent = dirname_malloc(done);
if (!parent)
return -ENOMEM;
r = path_extract_directory(done, &parent);
if (r < 0)
return r;
/* Don't allow this to leave the root dir. */
if (root &&