diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-26 13:33:17 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-26 13:33:17 +0200 |
commit | 29f80e6e4d698217933b7bd2df90c08162416d3f (patch) | |
tree | 324c496b016b694a3ee963e7ff29d21dcc36426c /common/storage_lmdb.cpp | |
parent | a9c40f85cf9487ab684c35d564a603e28ae63066 (diff) | |
download | sink-29f80e6e4d698217933b7bd2df90c08162416d3f.tar.gz sink-29f80e6e4d698217933b7bd2df90c08162416d3f.zip |
Don't just set the db version, only when we create the db first.
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r-- | common/storage_lmdb.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index 4e7f322..9d0bd6b 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -918,7 +918,8 @@ DataStore::~DataStore() | |||
918 | 918 | ||
919 | bool DataStore::exists() const | 919 | bool DataStore::exists() const |
920 | { | 920 | { |
921 | return (d->env != 0); | 921 | QFileInfo info(d->storageRoot + '/' + d->name + "/data.mdb"); |
922 | return (d->env != 0) && info.exists(); | ||
922 | } | 923 | } |
923 | 924 | ||
924 | DataStore::Transaction DataStore::createTransaction(AccessMode type, const std::function<void(const DataStore::Error &error)> &errorHandlerArg) | 925 | DataStore::Transaction DataStore::createTransaction(AccessMode type, const std::function<void(const DataStore::Error &error)> &errorHandlerArg) |