diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 82f6b8da2f..0e3244fceb 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -322,16 +322,7 @@ static int specifier_directory( if (r < 0) return r; - if (arg_root) { - _cleanup_free_ char *j = NULL; - - j = path_join(arg_root, p); - if (!j) - return -ENOMEM; - - *ret = TAKE_PTR(j); - } else - *ret = TAKE_PTR(p); + *ret = TAKE_PTR(p); return 0; } diff --git a/test/units/TEST-22-TMPFILES.15.sh b/test/units/TEST-22-TMPFILES.15.sh index 14c26b8295..68c6c301bd 100755 --- a/test/units/TEST-22-TMPFILES.15.sh +++ b/test/units/TEST-22-TMPFILES.15.sh @@ -42,3 +42,15 @@ systemd-tmpfiles --create --root="$root" - <&1 <