Panu Matilainen e0a8ab
diff --git a/lib/backend/db3.c b/lib/backend/db3.c
Panu Matilainen e0a8ab
index 9f0f941..b0b2a86 100644
Panu Matilainen e0a8ab
--- a/lib/backend/db3.c
Panu Matilainen e0a8ab
+++ b/lib/backend/db3.c
Panu Matilainen e0a8ab
@@ -1015,17 +1015,12 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
Panu Matilainen e0a8ab
 	    }
Panu Matilainen e0a8ab
 
Panu Matilainen e0a8ab
 	    if (rc == 0) {
Panu Matilainen e0a8ab
-		char * fullpath;
Panu Matilainen e0a8ab
-		const char * dbpath;
Panu Matilainen e0a8ab
-		fullpath = rpmGetPath(dbhome, "/", dbfile ? dbfile : "", NULL);
Panu Matilainen e0a8ab
-
Panu Matilainen e0a8ab
-#ifdef	HACK	/* XXX necessary to support dbsubfile */
Panu Matilainen e0a8ab
-		dbpath = (!dbi->dbi_use_dbenv && !dbi->dbi_temporary)
Panu Matilainen e0a8ab
-			? fullpath : dbfile;
Panu Matilainen e0a8ab
-#else
Panu Matilainen e0a8ab
-		dbpath = (!dbi->dbi_temporary)
Panu Matilainen e0a8ab
-			? fullpath : dbfile;
Panu Matilainen e0a8ab
-#endif
Panu Matilainen e0a8ab
+		char * fullpath = NULL;
Panu Matilainen e0a8ab
+		const char * dbpath = dbfile;
Panu Matilainen e0a8ab
+		if (!dbi->dbi_use_dbenv && !dbi->dbi_temporary) {
Panu Matilainen e0a8ab
+		    fullpath = rpmGetPath(dbhome, "/", dbfile, NULL);
Panu Matilainen e0a8ab
+		    dbpath = fullpath;
Panu Matilainen e0a8ab
+		}
Panu Matilainen e0a8ab
 
Panu Matilainen e0a8ab
 		rc = (db->open)(db, txnid, dbpath, dbsubfile,
Panu Matilainen e0a8ab
 		    dbi->dbi_type, oflags, dbi->dbi_perms);