only compute checksum of a local file that is not a virtual one
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 7 May 2024 16:31:02 +0000 (18:31 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 15 May 2024 13:06:11 +0000 (15:06 +0200)
should avoid triggering implicit hydration from within the desktop
client

triggering an implicit hydration on our own is strictly forbidden as
that is causing issues like deadlock and failed hydration attempts

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/propagatedownload.cpp

index d9ea4ad7f2072a6f1ad9cc00bed944b7d5b9099c..02c67c22b76316682102ae84f05688dd35910e69 100644 (file)
@@ -1131,7 +1131,8 @@ void PropagateDownloadFile::contentChecksumComputed(const QByteArray &checksumTy
     SyncJournalFileRecord record;
     if (_item->_instruction != CSYNC_INSTRUCTION_CONFLICT && FileSystem::fileExists(localFilePath)
         && (propagator()->_journal->getFileRecord(_item->_file, &record) && record.isValid())
-        && (record._modtime == _item->_modtime && record._etag != _item->_etag)) {
+        && (record._modtime == _item->_modtime && record._etag != _item->_etag)
+        && _item->_type == ItemTypeFile) {
         const auto computeChecksum = new ComputeChecksum(this);
         computeChecksum->setChecksumType(checksumType);
         connect(computeChecksum, &ComputeChecksum::done, this, &PropagateDownloadFile::localFileContentChecksumComputed);