소스 검색

build_filter: micro opt / easier code, fixes #3390

Thomas Waldmann 2 년 전
부모
커밋
8060d4100a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/borg/archiver/_common.py

+ 1 - 1
src/borg/archiver/_common.py

@@ -591,7 +591,7 @@ def build_filter(matcher, strip_components):
     if strip_components:
 
         def item_filter(item):
-            matched = matcher.match(item.path) and os.sep.join(item.path.split(os.sep)[strip_components:])
+            matched = matcher.match(item.path) and len(item.path.split(os.sep)) > strip_components
             return matched
 
     else: