From ff211b06781a086bdfec6b65ee482840ba71bdad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Fri, 3 Aug 2012 19:54:03 +0000 Subject: ~fix filesize computation --- URPM.xs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'URPM.xs') diff --git a/URPM.xs b/URPM.xs index 1bab88c..2ffdd58 100644 --- a/URPM.xs +++ b/URPM.xs @@ -359,9 +359,8 @@ get_fullname_parts(URPM__Package pkg, char **name, int *epoch, char **version, c } static size_t -get_filesize(Header h) { - /* XXX: 24 is padding..? */ - return rpmpkgSizeof("Lead", NULL) + 24 + headerSizeof(h) + get_int(h, RPMTAG_ARCHIVESIZE); +get_filesize(const Header h) { + return get_int(h, RPMTAG_SIGSIZE) + 440; /* 440 is the rpm header size (?) empirical, but works */ } static int -- cgit v1.2.1