|
|
@ -195,6 +195,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip) |
|
|
|
bool fSuccess = true; |
|
|
|
bool fSuccess = true; |
|
|
|
printf("Rewriting %s...\n", strFile.c_str()); |
|
|
|
printf("Rewriting %s...\n", strFile.c_str()); |
|
|
|
string strFileRes = strFile + ".rewrite"; |
|
|
|
string strFileRes = strFile + ".rewrite"; |
|
|
|
|
|
|
|
{ // surround usage of db with extra {}
|
|
|
|
CDB db(strFile.c_str(), "r"); |
|
|
|
CDB db(strFile.c_str(), "r"); |
|
|
|
Db* pdbCopy = new Db(&dbenv, 0); |
|
|
|
Db* pdbCopy = new Db(&dbenv, 0); |
|
|
|
|
|
|
|
|
|
|
@ -251,6 +252,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip) |
|
|
|
fSuccess = false; |
|
|
|
fSuccess = false; |
|
|
|
delete pdbCopy; |
|
|
|
delete pdbCopy; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (fSuccess) |
|
|
|
if (fSuccess) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Db dbA(&dbenv, 0); |
|
|
|
Db dbA(&dbenv, 0); |
|
|
|