unit-name: when escaping a path consider the empty path identical to the root dir

This commit is contained in:
Lennart Poettering 2013-09-26 20:03:20 +02:00
parent e203f7c3ad
commit 6270c1bd8f

View file

@ -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("-");
}