diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 666f48cfc33..df946293858 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -127,7 +127,10 @@ int path_make_absolute_cwd(const char *p, char **ret) { if (r < 0) return r; - c = strjoin(cwd, "/", p); + if (endswith(cwd, "/")) + c = strjoin(cwd, p); + else + c = strjoin(cwd, "/", p); } if (!c) return -ENOMEM;