From b0700ebbabada029823a43924b70e61a41640b81 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 25 Jan 2017 14:53:10 +0100 Subject: [PATCH] Remove duplicate SyncFileItem entries for the log The accuracy of that log isn't as important as the few bytes those fields take as hostage for the whole sync. --- src/gui/syncrunfilelog.cpp | 12 ++++++------ src/libsync/syncengine.cpp | 6 ------ src/libsync/syncfileitem.h | 5 ----- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/gui/syncrunfilelog.cpp b/src/gui/syncrunfilelog.cpp index 13d7bdf99..7e2877e3d 100644 --- a/src/gui/syncrunfilelog.cpp +++ b/src/gui/syncrunfilelog.cpp @@ -146,17 +146,17 @@ void SyncRunFileLog::logItem( const SyncFileItem& item ) const QChar L = QLatin1Char('|'); _out << ts << L; _out << QString::number(item._requestDuration) << L; - if( item.log._instruction != CSYNC_INSTRUCTION_RENAME ) { + if( item._instruction != CSYNC_INSTRUCTION_RENAME ) { _out << item._file << L; } else { _out << item._file << QLatin1String(" -> ") << item._renameTarget << L; } - _out << instructionToStr( item.log._instruction ) << L; + _out << instructionToStr( item._instruction ) << L; _out << directionToStr( item._direction ) << L; - _out << QString::number(item.log._modtime) << L; - _out << item.log._etag << L; - _out << QString::number(item.log._size) << L; - _out << item.log._fileId << L; + _out << QString::number(item._modtime) << L; + _out << item._etag << L; + _out << QString::number(item._size) << L; + _out << item._fileId << L; _out << item._status << L; _out << item._errorString << L; _out << QString::number(item._httpErrorCode) << L; diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index ce44878cc..462c6b268 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -653,12 +653,6 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote ) _needsUpdate = true; - item->log._etag = file->etag; - item->log._fileId = file->file_id; - item->log._instruction = file->instruction; - item->log._modtime = file->modtime; - item->log._size = file->size; - item->log._other_etag = file->other.etag; item->log._other_fileId = file->other.file_id; item->log._other_instruction = file->other.instruction; diff --git a/src/libsync/syncfileitem.h b/src/libsync/syncfileitem.h index 414763aea..221dbfd2f 100644 --- a/src/libsync/syncfileitem.h +++ b/src/libsync/syncfileitem.h @@ -179,15 +179,10 @@ public: QString _directDownloadCookies; struct { - quint64 _size; - time_t _modtime; - QByteArray _etag; - QByteArray _fileId; quint64 _other_size; time_t _other_modtime; QByteArray _other_etag; QByteArray _other_fileId; - enum csync_instructions_e _instruction BITFIELD(16); enum csync_instructions_e _other_instruction BITFIELD(16); } log; }; -- 2.39.5