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 a new issue