mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-08-25 13:50:12 +03:00
unit-name: when escaping a path consider the empty path identical to the root dir
This commit is contained in:
@ -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("-");
|
||||
}
|
||||
|
Reference in New Issue
Block a user