chiark / gitweb /
Prep v234: Apply missing upstream fixes in src/libelogind (2/6)
[elogind.git] / src / basic / dirent-util.h
index 58273bb988c62c2a3acddff951a9b2584e7a437a..18b9db9b28c6c3d80bd3a5d422149f5b4c3b6cee 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 #pragma once
 
 /***
 #include <errno.h>
 #include <stdbool.h>
 
-#include "path-util.h"
 #include "macro.h"
+#include "path-util.h"
 
 int dirent_ensure_type(DIR *d, struct dirent *de);
 
 bool dirent_is_file(const struct dirent *de) _pure_;
 bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) _pure_;
 
+struct dirent* readdir_no_dot(DIR *dirp);
+
 #define FOREACH_DIRENT(de, d, on_error)                                 \
         for (errno = 0, de = readdir(d);; errno = 0, de = readdir(d))   \
                 if (!de) {                                              \
@@ -40,7 +40,7 @@ bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) _pu
                                 on_error;                               \
                         }                                               \
                         break;                                          \
-                } else if (hidden_file((de)->d_name))                   \
+                } else if (hidden_or_backup_file((de)->d_name))         \
                         continue;                                       \
                 else