mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
unit-name: when escaping a path consider the empty path identical to the root dir
This commit is contained in:
parent
e203f7c3ad
commit
6270c1bd8f
@ -301,7 +301,7 @@ char *unit_name_path_escape(const char *f) {
|
||||
|
||||
path_kill_slashes(p);
|
||||
|
||||
if (streq(p, "/")) {
|
||||
if (streq(p, "/") || streq(p, "")) {
|
||||
free(p);
|
||||
return strdup("-");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user