summaryrefslogtreecommitdiffstats
path: root/common/store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/store.cpp')
-rw-r--r--common/store.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/store.cpp b/common/store.cpp
index ad2bb1c..34d547b 100644
--- a/common/store.cpp
+++ b/common/store.cpp
@@ -327,8 +327,7 @@ KAsync::Job<void> Store::removeDataFromDisk(const QByteArray &identifier)
327static KAsync::Job<Store::UpgradeResult> upgrade(const QByteArray &resource) 327static KAsync::Job<Store::UpgradeResult> upgrade(const QByteArray &resource)
328{ 328{
329 auto store = Sink::Storage::DataStore(Sink::storageLocation(), resource, Sink::Storage::DataStore::ReadOnly); 329 auto store = Sink::Storage::DataStore(Sink::storageLocation(), resource, Sink::Storage::DataStore::ReadOnly);
330 const auto version = Storage::DataStore::databaseVersion(store.createTransaction(Storage::DataStore::ReadOnly)); 330 if (!store.exists() || Storage::DataStore::databaseVersion(store.createTransaction(Storage::DataStore::ReadOnly)) == Sink::latestDatabaseVersion()) {
331 if (version == Sink::latestDatabaseVersion() || version == 0) {
332 return KAsync::value(Store::UpgradeResult{false}); 331 return KAsync::value(Store::UpgradeResult{false});
333 } 332 }
334 SinkLog() << "Upgrading " << resource; 333 SinkLog() << "Upgrading " << resource;