1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 10:18:12 +00:00

[BUGFIX] Borg commands accept absolute pathes, #4029

Strip leading path separator before trying to match a path.
This commit is contained in:
Thalian 2020-04-18 21:58:17 +02:00
parent ba154d1104
commit ece47ee9e4

View file

@ -143,7 +143,7 @@ def match(self, path):
in self.fallback is returned (defaults to None). in self.fallback is returned (defaults to None).
""" """
path = normalize_path(path) path = normalize_path(path).lstrip(os.path.sep)
# do a fast lookup for full path matches (note: we do not count such matches): # do a fast lookup for full path matches (note: we do not count such matches):
non_existent = object() non_existent = object()
value = self._path_full_patterns.get(path, non_existent) value = self._path_full_patterns.get(path, non_existent)