X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Fshared%2Futil.c;h=aaf109ea63e6f89d7c7edc8bfd7aea5f88d9034b;hb=375eadd911a9f83f89f1e7de5e05f44cc81e3642;hp=c1e1f9f020f6eb9287c6c46ee4c2f72e4aa1f785;hpb=09e00c524fd4d21a3508c27d01d265b8a6c9ae30;p=elogind.git diff --git a/src/shared/util.c b/src/shared/util.c index c1e1f9f02..aaf109ea6 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -5686,7 +5686,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;