summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tmpfiles/tmpfiles.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 473c51166b..e816bed201 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -465,18 +465,12 @@ static int dir_cleanup(
continue;
}
- if (i->type == IGNORE_DIRECTORY_PATH && streq(dent->d_name, p))
- log_debug("Ignoring directory \"%s\"", sub_path);
- else {
- log_debug("Removing directory \"%s\".", sub_path);
-
- if (unlinkat(dirfd(d), dent->d_name, AT_REMOVEDIR) < 0) {
- if (errno != ENOENT && errno != ENOTEMPTY) {
- log_error_errno(errno, "rmdir(%s): %m", sub_path);
- r = -errno;
- }
+ log_debug("Removing directory \"%s\".", sub_path);
+ if (unlinkat(dirfd(d), dent->d_name, AT_REMOVEDIR) < 0)
+ if (errno != ENOENT && errno != ENOTEMPTY) {
+ log_error_errno(errno, "rmdir(%s): %m", sub_path);
+ r = -errno;
}
- }
} else {
/* Skip files for which the sticky bit is