fix LOCK file deletion to prevent crash on windows

This commit is contained in:
Sanjay Ghemawat 2012-03-09 07:51:04 -08:00
parent d79762e273
commit 583f1499c0
1 changed files with 1 additions and 1 deletions

View File

@ -1427,7 +1427,7 @@ Status DestroyDB(const std::string& dbname, const Options& options) {
FileType type; FileType type;
for (size_t i = 0; i < filenames.size(); i++) { for (size_t i = 0; i < filenames.size(); i++) {
if (ParseFileName(filenames[i], &number, &type) && if (ParseFileName(filenames[i], &number, &type) &&
filenames[i] != lockname) { // Lock file will be deleted at end type != kDBLockFile) { // Lock file will be deleted at end
Status del = env->DeleteFile(dbname + "/" + filenames[i]); Status del = env->DeleteFile(dbname + "/" + filenames[i]);
if (result.ok() && !del.ok()) { if (result.ok() && !del.ok()) {
result = del; result = del;