@@ -663,38 +663,6 @@ void SyncEngine::updateFileTotal(const SyncFileItem &item, qint64 newSize)
663663 _progressInfo->updateTotalsForFile (item, newSize);
664664 Q_EMIT transmissionProgress (*_progressInfo);
665665}
666- void SyncEngine::restoreOldFiles (SyncFileItemSet &syncItems)
667- {
668- /* When the server is trying to send us lots of file in the past, this means that a backup
669- was restored in the server. In that case, we should not simply overwrite the newer file
670- on the file system with the older file from the backup on the server. Instead, we will
671- upload the client file. But we still downloaded the old file in a conflict file just in case
672- */
673-
674- for (auto it = syncItems.begin (); it != syncItems.end (); ++it) {
675- if ((*it)->_direction != SyncFileItem::Down)
676- continue ;
677-
678- switch ((*it)->instruction ()) {
679- case CSYNC_INSTRUCTION_SYNC:
680- qCWarning (lcEngine) << u" restoreOldFiles: RESTORING" << (*it)->localName ();
681- (*it)->setInstruction (CSYNC_INSTRUCTION_CONFLICT);
682- break ;
683- case CSYNC_INSTRUCTION_REMOVE:
684- qCWarning (lcEngine) << u" restoreOldFiles: RESTORING" << (*it)->localName ();
685- (*it)->setInstruction (CSYNC_INSTRUCTION_NEW);
686- (*it)->_direction = SyncFileItem::Up;
687- break ;
688- case CSYNC_INSTRUCTION_RENAME:
689- case CSYNC_INSTRUCTION_NEW:
690- // Ideally we should try to revert the rename or remove, but this would be dangerous
691- // without re-doing the reconcile phase. So just let it happen.
692- break ;
693- default :
694- break ;
695- }
696- }
697- }
698666
699667AccountPtr SyncEngine::account () const
700668{
0 commit comments