diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-20 16:54:34 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-20 16:54:34 +0200 |
commit | d67b886dd2cf51264e4d6da680e268015a0a7031 (patch) | |
tree | 105ead30cfe106361a028eb5b42de3dc65681173 /examples | |
parent | cdca3e36eddea7f43787fa6bbc2ad6b669c89185 (diff) | |
download | sink-d67b886dd2cf51264e4d6da680e268015a0a7031.tar.gz sink-d67b886dd2cf51264e4d6da680e268015a0a7031.zip |
Don't try to replay modifications on nothing.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/imapresource/imapresource.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 533dea3..bfe43bf 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp | |||
@@ -689,6 +689,12 @@ public: | |||
689 | 689 | ||
690 | KAsync::Job<QByteArray> replay(const ApplicationDomain::Folder &folder, Sink::Operation operation, const QByteArray &oldRemoteId, const QList<QByteArray> &changedProperties) Q_DECL_OVERRIDE | 690 | KAsync::Job<QByteArray> replay(const ApplicationDomain::Folder &folder, Sink::Operation operation, const QByteArray &oldRemoteId, const QList<QByteArray> &changedProperties) Q_DECL_OVERRIDE |
691 | { | 691 | { |
692 | if (operation != Sink::Operation_Creation) { | ||
693 | if(oldRemoteId.isEmpty()) { | ||
694 | Q_ASSERT(false); | ||
695 | return KAsync::error<QByteArray>("Tried to replay modification without old remoteId."); | ||
696 | } | ||
697 | } | ||
692 | auto imap = QSharedPointer<ImapServerProxy>::create(mServer, mPort, &mSessionCache); | 698 | auto imap = QSharedPointer<ImapServerProxy>::create(mServer, mPort, &mSessionCache); |
693 | auto login = imap->login(mUser, mPassword); | 699 | auto login = imap->login(mUser, mPassword); |
694 | if (operation == Sink::Operation_Creation) { | 700 | if (operation == Sink::Operation_Creation) { |