summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-09-26 20:03:20 +0200
committerLennart Poettering <lennart@poettering.net>2013-09-26 20:20:30 +0200
commit6270c1bd8f83e9985458c63688f452be7626766f (patch)
tree0184cae488cdb2518fc7b2f175a9db04df51a1f0
parentutil: properly handle the root dir in PATH_FOREACH_PREFIX (diff)
downloadsystemd-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.c2
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("-");
}