From: Michael Tremer Date: Thu, 27 Oct 2022 16:38:10 +0000 (+0000) Subject: file: Ignore any errors when trying to remove the parent X-Git-Tag: 0.9.28~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a87837090da5125e4b5c1443cc4b26834c50f1c4;p=pakfire.git file: Ignore any errors when trying to remove the parent Signed-off-by: Michael Tremer --- 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;