From: Michael Tremer Date: Fri, 7 Feb 2025 23:04:05 +0000 (+0000) Subject: file: Don't silently fail if archives should not be hashed X-Git-Tag: 0.9.30~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aba83a53991e5ba2605a1650a02eb167eb57707b;p=pakfire.git file: Don't silently fail if archives should not be hashed Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/file.c b/src/pakfire/file.c index 1e1736da..19014b18 100644 --- a/src/pakfire/file.c +++ b/src/pakfire/file.c @@ -501,9 +501,11 @@ struct archive_entry* pakfire_file_archive_entry(struct pakfire_file* file, cons } // Compute any required file hashes - r = pakfire_file_compute_hashes(file, hashes, &file->hashes); - if (r < 0) - goto ERROR; + if (hashes) { + r = pakfire_file_compute_hashes(file, hashes, &file->hashes); + if (r < 0) + goto ERROR; + } // SHA-3-512 if (pakfire_hashes_has(&file->hashes, PAKFIRE_HASH_SHA3_512))