X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftmpfiles%2Ftmpfiles.c;h=e816bed2016114518a1ca49fa7498b5282d7fe14;hb=612532206c531ab2aafd398338d5dd44cb6d3553;hp=473c51166b49daf368975270f9559f5a707f1357;hpb=0775b9b61120f8be99cd45a7df907b828188cb47;p=elogind.git diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 473c51166..e816bed20 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