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 <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Mar 7, 2023
1 parent ebdce7f commit 09dc566
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::ItemTypeFile) {
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 09dc566

Please sign in to comment.