Local discovery tracking: On success, also wipe _renameTarget

It's possible that the rename target was in the local discovery list.
This commit is contained in:
Christian Kamm 2019-03-28 09:33:20 +01:00 committed by Kevin Ottens
parent 04e0e22513
commit 0c0049c908
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -73,6 +73,8 @@ void LocalDiscoveryTracker::slotItemCompleted(const SyncFileItemPtr &item)
|| item->_instruction == CSYNC_INSTRUCTION_UPDATE_METADATA))) { || item->_instruction == CSYNC_INSTRUCTION_UPDATE_METADATA))) {
if (_previousLocalDiscoveryPaths.erase(item->_file.toUtf8())) if (_previousLocalDiscoveryPaths.erase(item->_file.toUtf8()))
qCDebug(lcLocalDiscoveryTracker) << "wiped successful item" << item->_file; qCDebug(lcLocalDiscoveryTracker) << "wiped successful item" << item->_file;
if (!item->_renameTarget.isEmpty() && _previousLocalDiscoveryPaths.erase(item->_renameTarget.toUtf8()))
qCDebug(lcLocalDiscoveryTracker) << "wiped successful item" << item->_renameTarget;
} else { } else {
_localDiscoveryPaths.insert(item->_file.toUtf8()); _localDiscoveryPaths.insert(item->_file.toUtf8());
qCDebug(lcLocalDiscoveryTracker) << "inserted error item" << item->_file; qCDebug(lcLocalDiscoveryTracker) << "inserted error item" << item->_file;