2
0
Эх сурвалжийг харах

Merge pull request #5133 from fantasya-pbem/bugfix/4029_Borg-commands-accept-absolute-paths

[BUGFIX] Borg commands accept absolute pathes, #4029
TW 5 жил өмнө
parent
commit
b46fcf0516

+ 1 - 1
src/borg/patterns.py

@@ -143,7 +143,7 @@ class PatternMatcher:
         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)