From a9dd208208e672a4fe5a3c2405946c1506e034db Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 28 Apr 2011 04:55:05 +0200 Subject: lookup: drop empty directories from search paths --- src/path-lookup.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/path-lookup.c') diff --git a/src/path-lookup.c b/src/path-lookup.c index b39ce8b699..b1c69814ca 100644 --- a/src/path-lookup.c +++ b/src/path-lookup.c @@ -205,6 +205,7 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as) { return -ENOMEM; strv_uniq(p->unit_path); + strv_path_remove_empty(p->unit_path); if (!strv_isempty(p->unit_path)) { @@ -259,6 +260,9 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as) { strv_uniq(p->sysvinit_path); strv_uniq(p->sysvrcnd_path); + strv_path_remove_empty(p->sysvinit_path); + strv_path_remove_empty(p->sysvrcnd_path); + if (!strv_isempty(p->sysvinit_path)) { if (!(t = strv_join(p->sysvinit_path, "\n\t"))) -- cgit v1.2.3-54-g00ecf