瀏覽代碼

Merge pull request #3473 from anowlcalledjosh/quote-repo-path

Properly quote repo path in `borg init` output
TW 7 年之前
父節點
當前提交
1d18d6bbb0
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/borg/archiver.py

+ 2 - 2
src/borg/archiver.py

@@ -252,10 +252,10 @@ class Archiver:
                 'errors if written to with an older version (up to and including Borg 1.0.8).\n'
                 'errors if written to with an older version (up to and including Borg 1.0.8).\n'
                 '\n'
                 '\n'
                 'If you want to use these older versions, you can disable the check by running:\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'
                 '\n'
                 'See https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability '
                 '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
         return self.exit_code
 
 
     @with_repository(exclusive=True, manifest=False)
     @with_repository(exclusive=True, manifest=False)