Skip to content

Commit

Permalink
prevent restoration of files that are not plain old files
Browse files Browse the repository at this point in the history
would prevent trying to restore pure virtual files

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Mar 7, 2023
1 parent 94bf126 commit 777350f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/libsync/syncengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,9 +992,11 @@ void SyncEngine::restoreOldFiles(SyncFileItemVector &syncItems)
syncItem->_instruction = CSYNC_INSTRUCTION_CONFLICT;
break;
case CSYNC_INSTRUCTION_REMOVE:
qCWarning(lcEngine) << "restoreOldFiles: RESTORING" << syncItem->_file;
syncItem->_instruction = CSYNC_INSTRUCTION_NEW;
syncItem->_direction = SyncFileItem::Up;
if (syncItem->_type != CSyncEnums::ItemTypeVirtualFile && syncItem->_type != CSyncEnums::ItemTypeVirtualFileDownload) {
qCWarning(lcEngine) << "restoreOldFiles: RESTORING" << syncItem->_file;
syncItem->_instruction = CSYNC_INSTRUCTION_NEW;
syncItem->_direction = SyncFileItem::Up;
}
break;
case CSYNC_INSTRUCTION_RENAME:
case CSYNC_INSTRUCTION_NEW:
Expand Down

0 comments on commit 777350f

Please sign in to comment.