changed minimal open code (again)
authorewt <devnull@localhost>
Thu, 4 Feb 1999 23:00:23 +0000 (23:00 +0000)
committerewt <devnull@localhost>
Thu, 4 Feb 1999 23:00:23 +0000 (23:00 +0000)
CVS patchset: 2775
CVS date: 1999/02/04 23:00:23

lib/rpmdb.c

index 0d3997c..5e8703b 100644 (file)
@@ -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)) {