]> git.ipfire.org Git - pakfire.git/commitdiff
packages: Always check if the file size matches
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Feb 2025 13:40:55 +0000 (13:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Feb 2025 13:40:55 +0000 (13:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/package.c

index 6c32be38baa9a772eb3e0fade66c8897ef145f01..401e18839dac58d0e9500f27dc2c3d18baf5b9b0 100644 (file)
@@ -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