mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
e974771796
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. |
||
---|---|---|
.. | ||
src | ||
tests | ||
AUTHORS | ||
ChangeLog | ||
CMakeLists.txt | ||
config_csync.h.cmake | ||
config_test.h.cmake | ||
ConfigureChecks.cmake | ||
COPYING | ||
CTestConfig.cmake | ||
CTestCustom.cmake | ||
DefineOptions.cmake | ||
INSTALL | ||
README |
WHAT IS CSYNC?
==============
csync is a lightweight utility to synchronize files between two directories on
a system or between multiple systems.
It synchronizes bidirectionally and allows the user to keep two copies of files
and directories in sync. csync uses widely adopted protocols, such as smb or
sftp, so that there is no need for a server component. It is a user-level
program which means you don’t need to be a superuser or administrator.
CONTRIBUTIONS
=============
If you want to contribute to the development of the software then please join
the mailing list. Patches are accepted preferably created with git and we are
always glad to receive feedback or suggestions to the address
csync-devel@csync.org.
More information on the various mailing lists can be found at
http://www.csync.org/communication/.
You can also get the sourcecode straight from the git repository - see
http://git.csync.org/
DOCUMENTATION
=============
As a user you can find a userguide which is shipped with this package or is
available at the website. For developers there is doxygen documentation and
comments in the source code itself. See
http://www.csync.org/userguide/
and
http://www.csync.org/api/