]> git.ipfire.org Git - pakfire.git/commitdiff
snapshots: Fix logic error and process directories
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 11 Jan 2025 18:42:03 +0000 (18:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 11 Jan 2025 18:42:03 +0000 (18:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/snapshot.c

index 51242ff1e6283fc7d5a40ceb149ae2cc4409d2e4..1a9101e0f87b68d9cd76bf143aaa89914b0ba640 100644 (file)
@@ -630,8 +630,13 @@ int pakfire_snapshot_clean(struct pakfire* pakfire) {
                }
 
                // We only care about directories
-               if (node->fts_info == FTS_D)
-                       continue;
+               switch (node->fts_info) {
+                       case FTS_D:
+                               break;
+
+                       default:
+                               continue;
+               }
 
                // Open the snapshot
                r = pakfire_snapshot_create(&snapshot, ctx, node->fts_path);