From: Claudio Cambra Date: Mon, 7 Aug 2023 00:24:43 +0000 (+0800) Subject: Set modificationHappened to also depend on file size change X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~92^2^2~53^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=812e696d53ef14c326e2312d7007ff40a3d23b3b;p=nextcloud-desktop.git Set modificationHappened to also depend on file size change Signed-off-by: Claudio Cambra --- diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index a999c8a0e..656689a55 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -357,7 +357,7 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item) // mini-jobs later on, we just update metadata right now. if (item->_direction == SyncFileItem::Down) { - auto modificationHappened = false; + auto modificationHappened = false; // Decides whether or not we modify file metadata QString filePath = _localPath + item->_file; // If the 'W' remote permission changed, update the local filesystem @@ -369,6 +369,8 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item) modificationHappened = FileSystem::setFileReadOnlyWeak(filePath, isReadOnly); } + modificationHappened |= item->_size != prev._fileSize; + auto rec = item->toSyncJournalFileRecordWithInode(filePath); if (rec._checksumHeader.isEmpty()) rec._checksumHeader = prev._checksumHeader;