summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/path-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index 48205dc32..5d39cf0d6 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -692,11 +692,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;
}
#endif // 0