From 2746446e4e14dd0d7e1daaf39cc1ed2ea556eec2 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 22 Jul 2009 17:43:52 +0200 Subject: [PATCH] - don't skip directories and empty files in inode count --- ext/repo_rpmdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index ed33bc9..117e850 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -537,7 +537,7 @@ adddudata(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rpmhead, sat_free(fsz); return; } - /* stupid rpm recodrs sizes of directories, so we have to check the mode */ + /* stupid rpm records sizes of directories, so we have to check the mode */ fm = headint16array(rpmhead, TAG_FILEMODES, &fszc); if (!fm || fc != fszc) { @@ -623,11 +623,11 @@ adddudata(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rpmhead, fkb = sat_calloc(dic, sizeof(unsigned int)); for (i = 0; i < fc; i++) { - if (fsz[i] == 0 || !S_ISREG(fm[i])) - continue; if (di[i] >= dic) continue; fn[di[i]]++; + if (fsz[i] == 0 || !S_ISREG(fm[i])) + continue; fkb[di[i]] += fsz[i] / 1024 + 1; } sat_free(fsz); -- 2.7.4