X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Finstall.c;h=03c7a9da2eb08e91031f51085f77a4a759bf1b7b;hp=0fe1371129c59a9d169b1a06b4aa0221c9a8f198;hb=fdbdf6ec29bda40763d7d3e7bb2a63e2f5d60c4c;hpb=5d0ae62c665262c4c55536457e84e278c252cc0b diff --git a/src/shared/install.c b/src/shared/install.c index 0fe137112..03c7a9da2 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -2044,6 +2044,12 @@ int unit_file_get_list( if (root_dir && scope != UNIT_FILE_SYSTEM) return -EINVAL; + if (root_dir) { + r = access(root_dir, F_OK); + if (r < 0) + return -errno; + } + r = lookup_paths_init_from_scope(&paths, scope, root_dir); if (r < 0) return r;