We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 638291f commit 6a41d45Copy full SHA for 6a41d45
crawler/utils/file_utils.py
@@ -1,4 +1,3 @@
1
-import fnmatch
2
import logging
3
import os
4
import re
@@ -26,8 +25,7 @@ def crawl_files(
26
25
root_dir_alias = root_dir
27
exclude_dirs = [os.path.join(root_dir, d) for d in
28
exclude_dirs]
29
- exclude_regex = r'|'.join([fnmatch.translate(d)
30
- for d in exclude_dirs]) or r'$.'
+ exclude_regex = re.compile(r'|'.join([d for d in exclude_dirs]))
31
32
# walk the directory hierarchy starting at 'root_dir' in BFS
33
# order
@@ -72,6 +70,7 @@ def _filetype(fpath, fperm):
72
70
}.get(modebit)
73
71
return ftype
74
+
75
_filemode_table = (
76
(
77
(stat.S_IFLNK, 'l'),
0 commit comments