From 2957246092abb5ceb730163a81f3ff226687633c Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sun, 1 Jun 2025 19:24:49 -0400 Subject: [PATCH] tmpfiles: implement remove logic for 'D' > D > Similar to d, but in addition the contents of the directory will be removed when --remove is used. --- src/tmpfiles.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tmpfiles.c b/src/tmpfiles.c index 49860762..b8365f5c 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -326,7 +326,12 @@ static void tmpfiles(char *line) case 'c': case 'C': case 'd': + break; case 'D': + if (fisdir(path)) { + nftw(path, do_delete, 20, FTW_DEPTH | FTW_PHYS); + } + break; case 'e': case 'f': case 'F':