summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-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("-");
}