浏览代码

Merge pull request #3133 from ThomasWaldmann/fix-nonlocal-path-detection-1.1

fix detection of non-local path, fixes #3108
TW 7 年之前
父节点
当前提交
42046524e5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/borg/archive.py

+ 1 - 1
src/borg/archive.py

@@ -557,7 +557,7 @@ Utilization of max. archive size: {csize_max:.0%}
 
         original_path = original_path or item.path
         dest = self.cwd
-        if item.path.startswith(('/', '..')):
+        if item.path.startswith(('/', '../')):
             raise Exception('Path should be relative and local')
         path = os.path.join(dest, item.path)
         # Attempt to remove existing files, ignore errors on failure