From 708f452e9bc7197b8dbe2503f9be76a420d1c021 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Tue, 27 Aug 2024 20:29:56 +0100 Subject: [PATCH] fixed issue with restic not forming command properly --- norg/borg/execute.nim | 2 +- norg/restic/execute.nim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/norg/borg/execute.nim b/norg/borg/execute.nim index ecba57d..7fe701e 100644 --- a/norg/borg/execute.nim +++ b/norg/borg/execute.nim @@ -17,7 +17,7 @@ proc genCreateCommand*(repo: string, sources: seq[string], stats: bool, further_ if not stats: stats_flag = "" var source_dirs = "" for source in sources: - source_dirs &= fmt""" "{source}" """ + source_dirs &= fmt""""{source}" """ let cmd = fmt"{BORG_BIN} create {stats_flag} {repo} {source_dirs} {args}" return cmd diff --git a/norg/restic/execute.nim b/norg/restic/execute.nim index 7d83edf..f97d9ef 100644 --- a/norg/restic/execute.nim +++ b/norg/restic/execute.nim @@ -14,9 +14,9 @@ proc genCommand*(cmd: string, repo: string, further_args: seq[string]): string = proc genBackupCommand*(repo: string, sources: seq[string], further_args: seq[string]): string = var source_dirs = "" for source in sources: - source_dirs &= fmt""""{source}"""" + source_dirs &= fmt""""{source}" """ let args = further_args.join(" ") - let cmd = fmt"{RESTIC_BIN} backup -r {repo} {sources} {args}" + let cmd = fmt"{RESTIC_BIN} backup -r {repo} {source_dirs} {args}" return cmd proc genRestoreCommand*(repo_snapshot: string, destination: string, further_args: seq[string]): string =