From: Michael Tremer Date: Wed, 7 Apr 2021 09:24:04 +0000 (+0000) Subject: snapshot: Use common writer X-Git-Tag: 0.9.28~1285^2~413 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bac3de3dc51d6cadc583aad6767a3918ca059d8d;p=pakfire.git snapshot: Use common writer Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/snapshot.c b/src/libpakfire/snapshot.c index 005145d25..5ace04968 100644 --- a/src/libpakfire/snapshot.c +++ b/src/libpakfire/snapshot.c @@ -219,22 +219,10 @@ static int pakfire_snapshot_extract(Pakfire pakfire, FILE* f) { // And they are compressed using ZSTD archive_read_support_filter_zstd(a); - struct archive* disk = archive_write_disk_new(); + struct archive* disk = pakfire_make_archive_disk_writer(pakfire); if (!disk) goto ERROR; - // Set flags for extracting contents - const int flags = - ARCHIVE_EXTRACT_ACL | - ARCHIVE_EXTRACT_OWNER | - ARCHIVE_EXTRACT_PERM | - ARCHIVE_EXTRACT_SPARSE | - ARCHIVE_EXTRACT_TIME | - ARCHIVE_EXTRACT_UNLINK | - ARCHIVE_EXTRACT_XATTR; - - archive_write_disk_set_options(disk, flags); - // Open the given file for reading r = archive_read_open_FILE(a, f); if (r) {