]> git.ipfire.org Git - pakfire.git/commitdiff
file: Ignore any errors when trying to remove the parent
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Oct 2022 16:38:10 +0000 (16:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Oct 2022 16:38:10 +0000 (16:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/file.c

index 10d41475d0fc69fe097650be35958bb59088fd2c..77883b908fa0f3b378f1d20af793176bbca6c3e3 100644 (file)
@@ -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;