Browse Source

Merge pull request #3138 from ThomasWaldmann/fix-nonlocal-path-detection-1.0

fix detection of non-local path, fixes #3108
TW 7 years ago
parent
commit
131c37db59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      borg/archive.py

+ 1 - 1
borg/archive.py

@@ -374,7 +374,7 @@ Number of files: {0.stats.nfiles}'''.format(
             return
 
         dest = self.cwd
-        if item[b'path'].startswith('/') or item[b'path'].startswith('..'):
+        if item[b'path'].startswith(('/', '../')):
             raise Exception('Path should be relative and local')
         path = os.path.join(dest, item[b'path'])
         # Attempt to remove existing files, ignore errors on failure