DBImpl::CheckConsistency() shouldn't create path name with double "/"

Summary: GetLiveFilesMetaData() already adds a leading "/" in file name. No need to add one extra "/" in DBImpl::CheckConsistency()

Test Plan: make all check

Reviewers: yhchiang, rven, igor

Reviewed By: igor

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D31779
main
sdong 10 years ago
parent 5e98e53249
commit 206237d121
  1. 3
      db/db_impl.cc

@ -3530,7 +3530,8 @@ Status DBImpl::CheckConsistency() {
std::string corruption_messages;
for (const auto& md : metadata) {
std::string file_path = md.db_path + "/" + md.name;
// md.name has a leading "/".
std::string file_path = md.db_path + md.name;
uint64_t fsize = 0;
Status s = env_->GetFileSize(file_path, &fsize);

Loading…
Cancel
Save