From b263888a4f96bca9b40b4d15a6b9753b798a42a6 Mon Sep 17 00:00:00 2001 From: Josh Holland Date: Fri, 22 Dec 2017 21:09:49 +0000 Subject: [PATCH] Properly quote repo path in `borg init` output Instead of printing this invalid command: borg upgrade --disable-tam '/path/test'repo' print this valid one: borg upgrade --disable-tam '/path/test'"'"'repo' (cherry picked from commit e7806608309b52e4aa71be306d967083b28d46f9) --- src/borg/archiver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index abd6a3adf..0ec6d05e0 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -279,10 +279,10 @@ def do_init(self, args, repository): 'errors if written to with an older version (up to and including Borg 1.0.8).\n' '\n' 'If you want to use these older versions, you can disable the check by running:\n' - 'borg upgrade --disable-tam \'%s\'\n' + 'borg upgrade --disable-tam %s\n' '\n' 'See https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability ' - 'for details about the security implications.', path) + 'for details about the security implications.', shlex.quote(path)) return self.exit_code @with_repository(exclusive=True, manifest=False)