mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
The current way of tracking the need to update the metadata without propagation using a separate flag makes it difficult to track priorities between the local and remote tree. The logic is also difficult to logically cover since the possibilities matrix isn't 100% covered, leaving the flag only used in a few situations (mostly involving folders, but not only). The reason we need to change this is to be able to track the sync state of files for overlay icons. The instruction alone can't be used since CSYNC_INSTRUCTION_SYNC is used for folders even though they won't be propagated. Removing this logic is however not possible without using something else than CSYNC_INSTRUCTION_NONE since too many codepath interpret (rightfully) this as meaning "nothing to do". This patch adds a new CSYNC_INSTRUCTION_UPDATE_METADATA instruction to let the update and reconcile steps tell the SyncEngine to update the metadata of a file without any propagation. Other flags are left to be interpretted by the implementation as implicitly needing metadata update or not, as this was already the case for most file propagation jobs. For example, CSYNC_INSTRUCTION_NEW for directories now also implicitly update the metadata. Since it's not impossible for folders to emit CSYNC_INSTRUCTION_SYNC or CSYNC_INSTRUCTION_CONFLICT, the corresponding code paths in the sync engine have been removed. Since the reconcile step can now know if the local tree needs metadata update while the remote side might want propagation, the localMetadataUpdate logic in SyncEngine::treewalkFile now simply use a CSYNC_INSTRUCTION_UPDATE_METADATA for the local side, which is now implemented as a different database query. |
||
|---|---|---|
| .. | ||
| std | ||
| vio | ||
| CMakeLists.txt | ||
| csync_exclude.c | ||
| csync_exclude.h | ||
| csync_log.c | ||
| csync_log.h | ||
| csync_macros.h | ||
| csync_misc.c | ||
| csync_misc.h | ||
| csync_private.h | ||
| csync_reconcile.c | ||
| csync_reconcile.h | ||
| csync_rename.cc | ||
| csync_rename.h | ||
| csync_statedb.c | ||
| csync_statedb.h | ||
| csync_time.c | ||
| csync_time.h | ||
| csync_update.c | ||
| csync_update.h | ||
| csync_util.c | ||
| csync_util.h | ||
| csync_version.h.in | ||
| csync.c | ||
| csync.h | ||