From 0e3a18313c0f1b850edcdec6783a8fd3f7a999cc Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 16 Feb 2025 13:40:55 +0000 Subject: [PATCH] packages: Always check if the file size matches Signed-off-by: Michael Tremer --- src/pakfire/package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pakfire/package.c b/src/pakfire/package.c index 6c32be38..401e1883 100644 --- a/src/pakfire/package.c +++ b/src/pakfire/package.c @@ -1423,7 +1423,7 @@ int pakfire_package_is_available(struct pakfire_package* self) { ssize_t size = pakfire_package_get_num(self, PAKFIRE_PKG_DOWNLOADSIZE, 0); // Check if the size matches - this is quite a good test to see if we have the right file - if ((size > 0) && (st.st_size != size)) + if (st.st_size != size) return 0; // Yes, this seems to be available -- 2.39.5