From 39daf317c745ee27e07186b92febe8214a444add Mon Sep 17 00:00:00 2001 From: ewt Date: Thu, 4 Feb 1999 23:00:23 +0000 Subject: [PATCH] changed minimal open code (again) CVS patchset: 2775 CVS date: 1999/02/04 23:00:23 --- lib/rpmdb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 0d3997c..5e8703b 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -194,9 +194,6 @@ int openDatabase(const char * prefix, const char * dbpath, rpmdb *rpmdbp, int mo rc = openDbFile(prefix, dbpath, "nameindex.rpm", justcheck, mode, &db.nameIndex, DB_HASH); - if (!rc) - rc = openDbFile(prefix, dbpath, "fileindex.rpm", justcheck, mode, - &db.fileIndex, DB_HASH); if (minimal) { *rpmdbp = malloc(sizeof(struct rpmdb_s)); @@ -204,6 +201,10 @@ int openDatabase(const char * prefix, const char * dbpath, rpmdb *rpmdbp, int mo return 0; } + if (!rc) + rc = openDbFile(prefix, dbpath, "fileindex.rpm", justcheck, mode, + &db.fileIndex, DB_HASH); + /* We used to store the fileindexes as complete paths, rather then plain basenames. Let's see which version we are... */ if (!justcheck && !dbiGetFirstKey(db.fileIndex, &akey)) { -- 2.7.4