Save the UPDATED files in the database

Those are files that were detected as "resolved conflict".
They should have been a conflict because they both were new, or both
had their local mtime or remote etag modified, but the size and mtime
is the same on the server.  This typically happen when the database is removed.
Nothing will be done for those file, but we still need to update the database.
This commit is contained in:
Olivier Goffart 2013-10-29 12:05:31 +01:00
parent 44fd03c058
commit 4ad9f34807

View File

@ -236,6 +236,11 @@ int CSyncThread::treewalkFile( TREE_WALK_FILE *file, bool remote )
_needsUpdate = true;
}
switch(file->instruction) {
case CSYNC_INSTRUCTION_UPDATED:
// We need to update the database.
_journal->setFileRecord(SyncJournalFileRecord(item, _localPath + item._file));
item._instruction = CSYNC_INSTRUCTION_NONE;
// fall trough
case CSYNC_INSTRUCTION_NONE:
if (item._isDirectory && remote) {
// Because we want still to update etags of directories
@ -264,7 +269,6 @@ int CSyncThread::treewalkFile( TREE_WALK_FILE *file, bool remote )
case CSYNC_INSTRUCTION_SYNC:
case CSYNC_INSTRUCTION_STAT_ERROR:
case CSYNC_INSTRUCTION_DELETED:
case CSYNC_INSTRUCTION_UPDATED:
default:
dir = remote ? SyncFileItem::Down : SyncFileItem::Up;
break;