fixed issue with restic not forming command properly
This commit is contained in:
parent
1f9c53b3f2
commit
708f452e9b
2 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ proc genCreateCommand*(repo: string, sources: seq[string], stats: bool, further_
|
||||||
if not stats: stats_flag = ""
|
if not stats: stats_flag = ""
|
||||||
var source_dirs = ""
|
var source_dirs = ""
|
||||||
for source in sources:
|
for source in sources:
|
||||||
source_dirs &= fmt""" "{source}" """
|
source_dirs &= fmt""""{source}" """
|
||||||
let cmd = fmt"{BORG_BIN} create {stats_flag} {repo} {source_dirs} {args}"
|
let cmd = fmt"{BORG_BIN} create {stats_flag} {repo} {source_dirs} {args}"
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
|
@ -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 =
|
proc genBackupCommand*(repo: string, sources: seq[string], further_args: seq[string]): string =
|
||||||
var source_dirs = ""
|
var source_dirs = ""
|
||||||
for source in sources:
|
for source in sources:
|
||||||
source_dirs &= fmt""""{source}""""
|
source_dirs &= fmt""""{source}" """
|
||||||
let args = further_args.join(" ")
|
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
|
return cmd
|
||||||
|
|
||||||
proc genRestoreCommand*(repo_snapshot: string, destination: string, further_args: seq[string]): string =
|
proc genRestoreCommand*(repo_snapshot: string, destination: string, further_args: seq[string]): string =
|
||||||
|
|
Loading…
Reference in a new issue