Merge pull request #6551

243b80d Handle leveldb::DestroyDB() errors on wipe failure (Adam Weiss)
This commit is contained in:
Wladimir J. van der Laan 2015-08-17 16:50:55 +02:00
commit 39ddaeb8fe
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -58,7 +58,8 @@ CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path& path, size_t nCa
} else { } else {
if (fWipe) { if (fWipe) {
LogPrintf("Wiping LevelDB in %s\n", path.string()); LogPrintf("Wiping LevelDB in %s\n", path.string());
leveldb::DestroyDB(path.string(), options); leveldb::Status result = leveldb::DestroyDB(path.string(), options);
HandleError(result);
} }
TryCreateDirectory(path); TryCreateDirectory(path);
LogPrintf("Opening LevelDB in %s\n", path.string()); LogPrintf("Opening LevelDB in %s\n", path.string());