From c154831c42d734a14074a1d29c4534b4325b0a99 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Fri, 3 Nov 2023 19:29:58 +0100 Subject: data-sync: Allow an entry-specific base Signed-off-by: Paul Kocialkowski --- data-sync | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data-sync b/data-sync index 8773a53..c8014c1 100755 --- a/data-sync +++ b/data-sync @@ -129,7 +129,12 @@ class data_sync(): def sync_data_entry(self, source, sink, sync_host, entry): print("\nSync "+text_green+text_bold+entry["path"]+text_reset+" from "+text_cyan+source["name"]+text_reset+" to "+text_cyan+sink["name"]+text_reset+" started") - source_path = os.path.join(source["base"], entry["path"]) + if "base" in entry: + base = entry["base"] + else: + base = source["base"] + + source_path = os.path.join(base, entry["path"]) sink_path = os.path.join(sink["base"], sync_host["path"]) + "/" excludes_path = self.excludes_prepare(entry) -- cgit v1.2.3