]> git.ipfire.org Git - pakfire.git/commitdiff
snapshot: Disable padding last block to avoid zstd to fail
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Mar 2021 16:24:57 +0000 (16:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Mar 2021 16:24:57 +0000 (16:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/snapshot.c

index 3bdb68422636ba1f3565d911aaa0201bc9f46509..d87d902716d24d655765768483ed33486b7dfa5b 100644 (file)
@@ -68,7 +68,6 @@ static struct archive* pakfire_snapshot_create_archive(Pakfire pakfire, FILE* f)
                goto ERROR;
        }
 
-#if 0
        // Enable Zstd
        r = archive_write_add_filter_zstd(a);
        if (r) {
@@ -84,7 +83,9 @@ static struct archive* pakfire_snapshot_create_archive(Pakfire pakfire, FILE* f)
                        archive_error_string(a));
                goto ERROR;
        }
-#endif
+
+       // Do not pad the last block
+       archive_write_set_bytes_in_last_block(a, 1);
 
        // Write archive to file
        r = archive_write_open_FILE(a, f);