Options::wal_dir shouldn't end in '/'
Summary: If a client specifies wal_dir with trailing '/', we will fail in deleting obsolete log files. See task #4083746 Test Plan: make check Reviewers: haobo, sdong Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D17535
This commit is contained in:
parent
f01a04ea2d
commit
7efdd9ef4d
@ -322,6 +322,9 @@ Options SanitizeOptions(const std::string& dbname,
|
||||
// Use dbname as default
|
||||
result.wal_dir = dbname;
|
||||
}
|
||||
if (result.wal_dir.back() == '/') {
|
||||
result.wal_dir = result.wal_dir.substr(result.wal_dir.size() - 1);
|
||||
}
|
||||
|
||||
// -- Sanitize the table properties collector
|
||||
// All user defined properties collectors will be wrapped by
|
||||
|
Loading…
x
Reference in New Issue
Block a user