if (up._valid && up._contentChecksum == remoteChecksumHeader) {
// Solve the conflict into an upload, or nothing
item->_instruction = up._modtime == localEntry.modtime ? CSYNC_INSTRUCTION_UPDATE_METADATA : CSYNC_INSTRUCTION_SYNC;
+ item->_direction = SyncFileItem::Up;
// Update the etag and other server metadata in the journal already
// (We can't use a typical CSYNC_INSTRUCTION_UPDATE_METADATA because
}
} else {
item->_instruction = CSYNC_INSTRUCTION_CONFLICT;
+ item->_direction = SyncFileItem::None;
}
} else {
// If the size or mtime is different, it's definitely a conflict.
// sizes and mtimes pops up when the local database is lost for
// whatever reason.
item->_instruction = isConflict ? CSYNC_INSTRUCTION_CONFLICT : CSYNC_INSTRUCTION_UPDATE_METADATA;
+ item->_direction = isConflict ? SyncFileItem::None : SyncFileItem::Down;
}
}
- item->_direction = item->_instruction == CSYNC_INSTRUCTION_CONFLICT ? SyncFileItem::None : SyncFileItem::Down;
if (dbEntry._type == ItemTypeVirtualFile)
item->_type = ItemTypeVirtualFileDownload;
if (item->_file.endsWith(_discoveryData->_syncOptions._virtualFileSuffix)) {
}
quint64 fileSize = FileSystem::getSize(fullFilePath);
+ _item->_size = fileSize;
_fileToUpload._size = fileSize;
// But skip the file if the mtime is too close to 'now'!