]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
util: Drop unused archive_entry argument from copy function
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Aug 2022 10:05:57 +0000 (10:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Aug 2022 10:05:57 +0000 (10:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/include/pakfire/util.h
src/libpakfire/snapshot.c
src/libpakfire/util.c

index f44a1e3a8eee8ebe0fa320619b32106a15c0e16f..1295b12a0d6c4f2fedf1e6a25b1b5eebba000487 100644 (file)
@@ -100,8 +100,7 @@ size_t pakfire_digest_length(enum pakfire_digests digest);
 
 // Archive Stuff
 
-int pakfire_archive_copy_data(struct archive* src, struct archive* dst,
-       struct archive_entry* entry);
+int pakfire_archive_copy_data(struct archive* src, struct archive* dst);
 int pakfire_archive_copy_data_to_buffer(struct pakfire* pakfire, struct archive* a,
        struct archive_entry* entry, char** data, size_t* data_size);
 
index 1d1529b7074ac68013214a74711fc179488367a7..9bf0118c6cb86397cb6f0f2c1d53bf04febef9e5 100644 (file)
@@ -183,8 +183,9 @@ int pakfire_snapshot_create(struct pakfire* pakfire, FILE* f) {
                        goto ERROR;
                }
 
-               if (archive_entry_size(entry) > 0) {
-                       r = pakfire_archive_copy_data(reader, a, entry);
+               // Copy payload
+               if (archive_entry_filetype(entry) == AE_IFREG) {
+                       r = pakfire_archive_copy_data(reader, a);
                        if (r) {
                                ERROR(pakfire, "Could not copy %s\n", archive_entry_pathname(entry));
 
index 1ada9d25ec962f337faef4dfc984620dbb984a59..ecbc531e8607f84cb791a1b74328e05563136514 100644 (file)
@@ -1050,8 +1050,7 @@ size_t pakfire_digest_length(enum pakfire_digests digest) {
 
 // Archive Stuff
 
-int pakfire_archive_copy_data(struct archive* src, struct archive* dst,
-               struct archive_entry* entry) {
+int pakfire_archive_copy_data(struct archive* src, struct archive* dst) {
        const void* buffer;
        size_t size;
        off_t offset;