Skip to content

Commit e482851

Browse files
committed
remove dead code
1 parent 3d59f5a commit e482851

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

src/libsync/syncengine.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -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

699667
AccountPtr SyncEngine::account() const
700668
{

src/libsync/syncengine.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,6 @@ private Q_SLOTS:
222222
QScopedPointer<SyncFileStatusTracker> _syncFileStatusTracker;
223223
Utility::ChronoElapsedTimer _duration;
224224

225-
/**
226-
* Instead of downloading files from the server, upload the files to the server
227-
*/
228-
void restoreOldFiles(SyncFileItemSet &syncItems);
229225

230226
// If ignored files should be ignored
231227
bool _ignore_hidden_files = false;

0 commit comments

Comments
 (0)