fix regression with VFS update metadata instruction
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 7 May 2024 17:07:49 +0000 (19:07 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 15 May 2024 13:06:11 +0000 (15:06 +0200)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/discovery.cpp
test/testsynccfapi.cpp

index 26ba91adb7d72ca4506bbe94d391096ec731b9f1..91d717c0feababfa64e7fb8e586b22d73629cf67 100644 (file)
@@ -1685,6 +1685,7 @@ void ProcessDirectoryJob::processFileFinalize(
 
     if (_discoveryData->_syncOptions._vfs &&
         item->_type == CSyncEnums::ItemTypeFile &&
+        item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
         !_discoveryData->_syncOptions._vfs->isPlaceHolderInSync(_discoveryData->_localDir + path._local)) {
         item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_UPDATE_VFS_METADATA;
     }
index fa47395ec0d62ef85ff7c3ee2a811b1d5790aaf0..d537951e9eb4a8ad89abc553a9c6e5d76e0cc5a2 100644 (file)
@@ -411,7 +411,6 @@ private slots:
         fakeFolder.localModifier().insert("A/a3");
         fakeFolder.remoteModifier().appendByte("A/a2");
         QVERIFY(fakeFolder.syncOnce());
-        QEXPECT_FAIL("", "", Abort);
         QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState());
         cleanup();