From: Lennart Poettering Date: Thu, 26 Sep 2013 18:03:20 +0000 (+0200) Subject: unit-name: when escaping a path consider the empty path identical to the root dir X-Git-Tag: v208~45 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6270c1bd8f83e9985458c63688f452be7626766f unit-name: when escaping a path consider the empty path identical to the root dir --- diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 8f6c28e86..bc8094d11 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -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("-"); }