From c7f0a67f17336a8ffc0cbd6627201d902420b0a3 Mon Sep 17 00:00:00 2001 From: furtest Date: Wed, 21 Jan 2026 10:33:52 +0100 Subject: [PATCH] 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. --- src/unisync/runners.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unisync/runners.py b/src/unisync/runners.py index af51ded..c2391ac 100644 --- a/src/unisync/runners.py +++ b/src/unisync/runners.py @@ -28,7 +28,11 @@ def unisync_add(synchroniser:Synchroniser, paths_manager:PathsManager, config: C return 1 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() + synchroniser.sync_files(paths_manager.get_paths_to_sync(), force=True) synchroniser.close_ssh_master_connection()