summaryrefslogtreecommitdiffstats
path: root/common/storage_lmdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r--common/storage_lmdb.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index ddb4f84..660326a 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -974,13 +974,12 @@ void DataStore::removeFromDisk() const
974 QWriteLocker dbiLocker(&sDbisLock); 974 QWriteLocker dbiLocker(&sDbisLock);
975 QWriteLocker envLocker(&sEnvironmentsLock); 975 QWriteLocker envLocker(&sEnvironmentsLock);
976 SinkTrace() << "Removing database from disk: " << fullPath; 976 SinkTrace() << "Removing database from disk: " << fullPath;
977 sEnvironments.take(fullPath); 977 auto env = sEnvironments.take(fullPath);
978 for (const auto &key : sDbis.keys()) { 978 for (const auto &key : sDbis.keys()) {
979 if (key.startsWith(d->name)) { 979 if (key.startsWith(d->name)) {
980 sDbis.remove(key); 980 sDbis.remove(key);
981 } 981 }
982 } 982 }
983 auto env = sEnvironments.take(fullPath);
984 mdb_env_close(env); 983 mdb_env_close(env);
985 QDir dir(fullPath); 984 QDir dir(fullPath);
986 if (!dir.removeRecursively()) { 985 if (!dir.removeRecursively()) {