diff options
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r-- | common/storage_lmdb.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index 2dc4817..591d761 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -396,12 +396,14 @@ qint64 Storage::diskUsage() const | |||
396 | 396 | ||
397 | void Storage::removeFromDisk() const | 397 | void Storage::removeFromDisk() const |
398 | { | 398 | { |
399 | QDir dir(d->storageRoot + '/' + d->name); | 399 | const QString fullPath(d->storageRoot + '/' + d->name); |
400 | // dir.remove("data.mdb"); | 400 | QMutexLocker locker(&d->sMutex); |
401 | // dir.remove("lock.mdb"); | 401 | QDir dir(fullPath); |
402 | if (!dir.removeRecursively()) { | 402 | if (!dir.removeRecursively()) { |
403 | qWarning() << "Failed to remove directory" << d->storageRoot << d->name; | 403 | qWarning() << "Failed to remove directory" << d->storageRoot << d->name; |
404 | } | 404 | } |
405 | auto env = d->sEnvironments.take(fullPath); | ||
406 | delete env; | ||
405 | } | 407 | } |
406 | 408 | ||
407 | } // namespace Akonadi2 | 409 | } // namespace Akonadi2 |