diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index e33dda14d4387..669d9f5c7583b 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -673,7 +673,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(const SyncFileItemPtr &it } // We want to check the lock state of this file after the lock time has expired - if(serverEntry.locked == SyncFileItem::LockStatus::LockedItem) { + if(serverEntry.locked == SyncFileItem::LockStatus::LockedItem && serverEntry.lockTimeout > 0) { const auto lockExpirationTime = serverEntry.lockTime + serverEntry.lockTimeout; const auto timeRemaining = QDateTime::currentDateTime().secsTo(QDateTime::fromSecsSinceEpoch(lockExpirationTime)); // Add on a second as a precaution, sometimes we catch the server before it has had a chance to update