diff --git a/src/shared/util.c b/src/shared/util.c index 65a09d90d..7aa3d0271 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -5701,7 +5701,10 @@ static int search_and_fopen_internal(const char *path, const char *mode, const c _cleanup_free_ char *p = NULL; FILE *f; - p = strjoin(*i, "/", path, NULL); + if (root) + p = strjoin(root, *i, "/", path, NULL); + else + p = strjoin(*i, "/", path, NULL); if (!p) return -ENOMEM;