runners : add synchronisation to unisync_add
unisync_add was missing synchronisation steps that allow to synchronise a new file (present on the server but as a link locally). This adds the two necessary synchronisations, the first one so all the files are up to date and are not overwritten by the second one which forces all the changes from the remote to overwrite the local ones. This has the effect to replace the link with the actual file.
This commit is contained in:
@@ -28,7 +28,11 @@ def unisync_add(synchroniser:Synchroniser, paths_manager:PathsManager, config: C
|
|||||||
return 1
|
return 1
|
||||||
print("Connected to the remote.")
|
print("Connected to the remote.")
|
||||||
|
|
||||||
|
# TODO config or cli to skip this first sync
|
||||||
|
synchroniser.sync_files(paths_manager.get_paths_to_sync())
|
||||||
|
|
||||||
paths_manager.add_files_to_sync()
|
paths_manager.add_files_to_sync()
|
||||||
|
synchroniser.sync_files(paths_manager.get_paths_to_sync(), force=True)
|
||||||
|
|
||||||
synchroniser.close_ssh_master_connection()
|
synchroniser.close_ssh_master_connection()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user