mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-24 07:01:59 +00:00
Merge pull request #3120 from ThomasWaldmann/fix-nonlocal-path-detection
fix detection of non-local path, fixes #3108
This commit is contained in:
commit
13a4439bb8
1 changed files with 1 additions and 1 deletions
|
@ -557,7 +557,7 @@ def extract_item(self, item, restore_attrs=True, dry_run=False, stdout=False, sp
|
||||||
|
|
||||||
original_path = original_path or item.path
|
original_path = original_path or item.path
|
||||||
dest = self.cwd
|
dest = self.cwd
|
||||||
if item.path.startswith(('/', '..')):
|
if item.path.startswith(('/', '../')):
|
||||||
raise Exception('Path should be relative and local')
|
raise Exception('Path should be relative and local')
|
||||||
path = os.path.join(dest, item.path)
|
path = os.path.join(dest, item.path)
|
||||||
# Attempt to remove existing files, ignore errors on failure
|
# Attempt to remove existing files, ignore errors on failure
|
||||||
|
|
Loading…
Reference in a new issue