SyncEngine: fix test regression in TestChunkingNG::testCreateConflictWhileSyncing
authorOlivier Goffart <ogoffart@woboq.com>
Thu, 16 Mar 2017 08:27:17 +0000 (09:27 +0100)
committerOlivier Goffart <olivier@woboq.com>
Thu, 16 Mar 2017 09:17:08 +0000 (10:17 +0100)
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

src/libsync/syncengine.cpp

index 047732d485a6af8f05a008496c4f9ac4b500672a..5aa2376b0a59848ea21cce431d906c5decab5ac0 100644 (file)
@@ -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;
     }