diff options
author | cmumford <cmumford@google.com> | 2017-10-17 13:05:47 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2017-11-03 15:03:20 -0700 |
commit | 0509414f858ae7c7225e29f3659a709afb324355 (patch) | |
tree | 3d5a69be50a6298d40d3bc6537c687baf11b1118 /include | |
parent | 23162ca1c6d891a9c5fe0e0fab1193cd54ed1b4f (diff) | |
download | leveldb-0509414f858ae7c7225e29f3659a709afb324355.tar.gz |
leveldb::DestroyDB will now delete empty directories.
Env's that filtered out dot files ("." and "..") would return an
empty vector of children causing DestroyDB to do nothing. This fixes
https://github.com/google/leveldb/issues/215
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172501335
Diffstat (limited to 'include')
-rw-r--r-- | include/leveldb/db.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/leveldb/db.h b/include/leveldb/db.h index 9a18c92..e99f45c 100644 --- a/include/leveldb/db.h +++ b/include/leveldb/db.h @@ -151,6 +151,9 @@ class LEVELDB_EXPORT DB { // Destroy the contents of the specified database. // Be very careful using this method. +// +// Note: For backwards compatibility, if DestroyDB is unable to list the +// database files, Status::OK() will still be returned masking this failure. LEVELDB_EXPORT Status DestroyDB(const std::string& name, const Options& options); |