From: Olivier Goffart Date: Thu, 16 Mar 2017 08:27:17 +0000 (+0100) Subject: SyncEngine: fix test regression in TestChunkingNG::testCreateConflictWhileSyncing X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~790^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0ed929f24b67a0d4705b4e977c2c86fb75cff488;p=nextcloud-desktop.git SyncEngine: fix test regression in TestChunkingNG::testCreateConflictWhileSyncing In 8ef11a38c99c6a33b175f1ad792ec02b52f88d25, we started blacklisting SoftError for 0 seconds. But if the two sync happen with less than 1s interval, we would still prevent them to happen. So make sure we expire if 0 seconds have expired --- diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 047732d48..5aa2376b0 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -230,7 +230,7 @@ bool SyncEngine::checkErrorBlacklisting( SyncFileItem &item ) // If duration has expired, it's not blacklisted anymore time_t now = Utility::qDateTimeToTime_t(QDateTime::currentDateTime()); - if( now > entry._lastTryTime + entry._ignoreDuration ) { + if( now >= entry._lastTryTime + entry._ignoreDuration ) { qDebug() << "blacklist entry for " << item._file << " has expired!"; return false; }