mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-21 21:57:36 +00:00
patterns: explicate translate source
This commit is contained in:
parent
580496b592
commit
c5e3232187
1 changed files with 2 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
|||
import argparse
|
||||
import fnmatch
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
import unicodedata
|
||||
from collections import namedtuple
|
||||
from enum import Enum
|
||||
from fnmatch import translate
|
||||
|
||||
from . import shellpattern
|
||||
from .helpers import clean_lines
|
||||
|
@ -258,7 +258,7 @@ def _prepare(self, pattern):
|
|||
|
||||
# fnmatch and re.match both cache compiled regular expressions.
|
||||
# Nevertheless, this is about 10 times faster.
|
||||
self.regex = re.compile(translate(self.pattern))
|
||||
self.regex = re.compile(fnmatch.translate(self.pattern))
|
||||
|
||||
def _match(self, path):
|
||||
return (self.regex.match(path + os.path.sep) is not None)
|
||||
|
|
Loading…
Reference in a new issue