From a87837090da5125e4b5c1443cc4b26834c50f1c4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 27 Oct 2022 16:38:10 +0000 Subject: [PATCH] file: Ignore any errors when trying to remove the parent Signed-off-by: Michael Tremer --- src/libpakfire/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libpakfire/file.c b/src/libpakfire/file.c index 10d41475d..77883b908 100644 --- a/src/libpakfire/file.c +++ b/src/libpakfire/file.c @@ -911,13 +911,13 @@ int pakfire_file_cleanup(struct pakfire_file* file) { if (!*path) break; + DEBUG(file->pakfire, "Trying to remove parent directory %s\n", path); + r = rmdir(path); - if (r) { - if (errno == ENOTEMPTY) - return 0; - return r; - } + // Break on any error + if (r) + break; } return 0; -- 2.39.5