summaryrefslogtreecommitdiffstats
path: root/common/synchronizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r--common/synchronizer.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp
index fcd135c..3e7bd30 100644
--- a/common/synchronizer.cpp
+++ b/common/synchronizer.cpp
@@ -589,21 +589,19 @@ KAsync::Job<void> Synchronizer::replay(const QByteArray &type, const QByteArray
589 return job.then([this, operation, type, uid, oldRemoteId](const QByteArray &remoteId) { 589 return job.then([this, operation, type, uid, oldRemoteId](const QByteArray &remoteId) {
590 if (operation == Sink::Operation_Creation) { 590 if (operation == Sink::Operation_Creation) {
591 SinkTraceCtx(mLogCtx) << "Replayed creation with remote id: " << remoteId; 591 SinkTraceCtx(mLogCtx) << "Replayed creation with remote id: " << remoteId;
592 if (remoteId.isEmpty()) { 592 if (!remoteId.isEmpty()) {
593 SinkWarningCtx(mLogCtx) << "Returned an empty remoteId from the creation";
594 } else {
595 syncStore().recordRemoteId(type, uid, remoteId); 593 syncStore().recordRemoteId(type, uid, remoteId);
596 } 594 }
597 } else if (operation == Sink::Operation_Modification) { 595 } else if (operation == Sink::Operation_Modification) {
598 SinkTraceCtx(mLogCtx) << "Replayed modification with remote id: " << remoteId; 596 SinkTraceCtx(mLogCtx) << "Replayed modification with remote id: " << remoteId;
599 if (remoteId.isEmpty()) { 597 if (!remoteId.isEmpty()) {
600 SinkWarningCtx(mLogCtx) << "Returned an empty remoteId from the modification";
601 } else {
602 syncStore().updateRemoteId(type, uid, remoteId); 598 syncStore().updateRemoteId(type, uid, remoteId);
603 } 599 }
604 } else if (operation == Sink::Operation_Removal) { 600 } else if (operation == Sink::Operation_Removal) {
605 SinkTraceCtx(mLogCtx) << "Replayed removal with remote id: " << oldRemoteId; 601 SinkTraceCtx(mLogCtx) << "Replayed removal with remote id: " << oldRemoteId;
606 syncStore().removeRemoteId(type, uid, oldRemoteId); 602 if (!oldRemoteId.isEmpty()) {
603 syncStore().removeRemoteId(type, uid, oldRemoteId);
604 }
607 } else { 605 } else {
608 SinkErrorCtx(mLogCtx) << "Unkown operation" << operation; 606 SinkErrorCtx(mLogCtx) << "Unkown operation" << operation;
609 } 607 }