diff options
-rw-r--r-- | common/store.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/store.cpp b/common/store.cpp index 68f73c8..2c1dcad 100644 --- a/common/store.cpp +++ b/common/store.cpp | |||
@@ -45,7 +45,7 @@ QString Store::storageLocation() | |||
45 | return Sink::storageLocation(); | 45 | return Sink::storageLocation(); |
46 | } | 46 | } |
47 | 47 | ||
48 | static QList<QByteArray> getResources(const QList<QByteArray> &resourceFilter, const QByteArray &type) | 48 | static QList<QByteArray> getResources(const QList<QByteArray> &resourceFilter, const QByteArray &type = QByteArray()) |
49 | { | 49 | { |
50 | // Return the global resource (signified by an empty name) for types that don't eblong to a specific resource | 50 | // Return the global resource (signified by an empty name) for types that don't eblong to a specific resource |
51 | if (type == "sinkresource") { | 51 | if (type == "sinkresource") { |
@@ -163,7 +163,8 @@ KAsync::Job<void> Store::removeDataFromDisk(const QByteArray &identifier) | |||
163 | KAsync::Job<void> Store::synchronize(const Sink::Query &query) | 163 | KAsync::Job<void> Store::synchronize(const Sink::Query &query) |
164 | { | 164 | { |
165 | Trace() << "synchronize" << query.resources; | 165 | Trace() << "synchronize" << query.resources; |
166 | return KAsync::iterate(query.resources) | 166 | auto resources = getResources(query.resources); |
167 | return KAsync::iterate(resources) | ||
167 | .template each<void, QByteArray>([query](const QByteArray &resource, KAsync::Future<void> &future) { | 168 | .template each<void, QByteArray>([query](const QByteArray &resource, KAsync::Future<void> &future) { |
168 | Trace() << "Synchronizing " << resource; | 169 | Trace() << "Synchronizing " << resource; |
169 | auto resourceAccess = ResourceAccessFactory::instance().getAccess(resource); | 170 | auto resourceAccess = ResourceAccessFactory::instance().getAccess(resource); |