Discovery: Adjust the instruction in case of resolved conflict
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 16 Oct 2018 12:44:20 +0000 (14:44 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:09 +0000 (10:58 +0100)
When resolving a conflict because the file was just updated on the server,
we write all the metadata on the database immediatly, so INSTRUCITON_NONE
is enough and UPDATE_METADATA is not needed

src/libsync/discovery.cpp

index c8dc6aaa15fa1c4a7dda2915e464ff7b01c220a4..79a53cde36984ed91beabcedcc9dc9ec32ebc659 100644 (file)
@@ -711,7 +711,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
                     if (up._valid && up._contentChecksum == remoteChecksumHeader) {
                         // Solve the conflict into an upload, or nothing
                         item->_instruction = up._modtime == localEntry.modtime && up._size == localEntry.size
-                            ? CSYNC_INSTRUCTION_UPDATE_METADATA : CSYNC_INSTRUCTION_SYNC;
+                            ? CSYNC_INSTRUCTION_NONE : CSYNC_INSTRUCTION_SYNC;
                         item->_direction = SyncFileItem::Up;
 
                         // Update the etag and other server metadata in the journal already