1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-04 17:47:03 +03:00

path-util: one more empty_or_root() change

This commit is contained in:
Lennart Poettering 2018-04-25 11:23:01 +02:00
parent 5d9614077d
commit 53e87b5afe

View File

@ -685,11 +685,12 @@ int parse_path_argument_and_warn(const char *path, bool suppress_root, char **ar
return log_error_errno(r, "Failed to parse path \"%s\" and make it absolute: %m", path);
path_kill_slashes(p);
if (suppress_root && path_equal(p, "/"))
if (suppress_root && empty_or_root(p))
p = mfree(p);
free(*arg);
*arg = p;
return 0;
}