summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sysv-generator/sysv-generator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 3279c7f444..b8b77aa035 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -752,8 +752,10 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
struct stat st;
int r;
- if (hidden_file(de->d_name))
- continue;
+ dirent_ensure_type(d, de);
+
+ if (!dirent_is_file(de))
+ continue;
if (fstatat(dirfd(d), de->d_name, &st, 0) < 0) {
log_warning_errno(errno, "stat() failed on %s/%s: %m", *path, de->d_name);