aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-15 17:37:55 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-15 17:37:55 +0000
commit96cf1fb40cb7233a176e1dfd512ed41f2da5437f (patch)
tree3d245fb761f5d7946a127492e7b5df81249aae4c /URPM.xs
parentbf134e0f3860bbd676ea47c21444aef732a75750 (diff)
downloadperl-URPM-96cf1fb40cb7233a176e1dfd512ed41f2da5437f.tar
perl-URPM-96cf1fb40cb7233a176e1dfd512ed41f2da5437f.tar.gz
perl-URPM-96cf1fb40cb7233a176e1dfd512ed41f2da5437f.tar.bz2
perl-URPM-96cf1fb40cb7233a176e1dfd512ed41f2da5437f.tar.xz
perl-URPM-96cf1fb40cb7233a176e1dfd512ed41f2da5437f.zip
(return_files) fix RPMTAG_OLDFILENAMES case
was broken since commit r250325 by pixel on Tue Dec 9 2008 +0000: "- adapt to rpm 4.6 changes: headerGetEntry -> headerGet" previously count was initialized the right way this show it's unused since it's broken for 4 years this is a theoric issues since RPMTAG_(BASENAMES|DIRINDEXES|_DIRNAMES) date from 1999...
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/URPM.xs b/URPM.xs
index 285d483..c17506e 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -707,7 +707,8 @@ return_files(const Header header, int filter_mode) {
rpmtdInit(&td_list);
}
- for(i = 0; i < rpmtdCount(&td_baseNames); i++) {
+ int count = is_oldfilenames ? rpmtdCount(&td_list) : rpmtdCount(&td_baseNames);
+ for(i = 0; i < count; i++) {
if (is_oldfilenames) {
s = rpmtdNextString(&td_list);
len = strlen(s);