From: Michael Schroeder Date: Wed, 22 Jul 2009 15:43:52 +0000 (+0200) Subject: - don't skip directories and empty files in inode count X-Git-Tag: BASE-SuSE-Code-12_1-Branch~165^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2746446e4e14dd0d7e1daaf39cc1ed2ea556eec2;p=thirdparty%2Flibsolv.git - don't skip directories and empty files in inode count --- diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index ed33bc94..117e8508 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);