diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-09-26 20:03:20 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-09-26 20:20:30 +0200 |
commit | 6270c1bd8f83e9985458c63688f452be7626766f (patch) | |
tree | 0184cae488cdb2518fc7b2f175a9db04df51a1f0 | |
parent | util: properly handle the root dir in PATH_FOREACH_PREFIX (diff) | |
download | systemd-6270c1bd8f83e9985458c63688f452be7626766f.tar.xz systemd-6270c1bd8f83e9985458c63688f452be7626766f.zip |
unit-name: when escaping a path consider the empty path identical to the root dir
-rw-r--r-- | src/shared/unit-name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 8f6c28e86a..bc8094d112 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("-"); } |