engine: When restoring the file, use the mtime and fileid from the server

Important to switch the things around as we are going to write them in the DB
This commit is contained in:
Olivier Goffart 2014-06-18 16:15:14 +02:00
parent 38254125c9
commit 02355696ff

View file

@ -756,6 +756,10 @@ void SyncEngine::checkForPermission()
it->_instruction = CSYNC_INSTRUCTION_CONFLICT;
it->_direction = SyncFileItem::Down;
it->_isRestoration = true;
// take the things to write to the db from the "other" node (i.e: info from server)
it->_modtime = it->log._other_modtime;
it->_fileId = it->log._other_fileId;
it->_etag = it->log._other_etag;
it->_errorString = tr("Not allowed to upload this file because it is read-only on the server, restoring");
continue;
}