From: Hannah von Reth Date: Fri, 27 Nov 2020 10:26:41 +0000 (+0100) Subject: Log state before specific assertion X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~78 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8c3749cbe2eaa9792ec19b00af39ad61801b9d89;p=nextcloud-desktop.git Log state before specific assertion --- diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 39004ab73..51e0e15fd 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -168,11 +168,22 @@ QPair DiscoveryPhase::findAndCancelDeletedJob(const QString &o result = true; oldEtag = (*it)->_etag; } else { - ENFORCE(instruction == CSYNC_INSTRUCTION_REMOVE - // re-creation of virtual files count as a delete - || ((*it)->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW) - || ((*it)->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW) - ); + if (!(instruction == CSYNC_INSTRUCTION_REMOVE + // re-creation of virtual files count as a delete + || ((*it)->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW) + || ((*it)->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW))) + { + qCWarning(lcDiscovery) << "OC_ENFORCE(FAILING)"; + qCWarning(lcDiscovery) << "instruction == CSYNC_INSTRUCTION_REMOVE" << (instruction == CSYNC_INSTRUCTION_REMOVE); + qCWarning(lcDiscovery) << "((*it)->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW)" + << ((*it)->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW); + qCWarning(lcDiscovery) << "((*it)->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW))" + << ((*it)->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW); + qCWarning(lcDiscovery) << "instruction" << instruction; + qCWarning(lcDiscovery) << "(*it)->_type" << (*it)->_type; + qCWarning(lcDiscovery) << "(*it)->_isRestoration " << (*it)->_isRestoration; + ENFORCE(false); + } (*it)->_instruction = CSYNC_INSTRUCTION_NONE; result = true; oldEtag = (*it)->_etag;