File tree Expand file tree Collapse file tree 1 file changed +8
-37
lines changed Expand file tree Collapse file tree 1 file changed +8
-37
lines changed Original file line number Diff line number Diff line change @@ -85,48 +85,19 @@ def _treewalk(self, path):
85
85
if isdir (fullpath ):
86
86
if fullpath in self .exclude_paths :
87
87
self .logger .debug ("Ignoring %s (excluded)" , fullpath )
88
- elif is_hidden (fullpath ):
89
- self .logger .debug ("Ignoring %s (hidden)" , fullpath )
90
- else :
91
- empty = True
92
- for item in self ._treewalk (fullpath ):
93
- yield item
94
- empty = False
95
- if not empty :
96
- yield fullpath
88
+ continue
89
+
90
+ empty = True
91
+ for item in self ._treewalk (fullpath ):
92
+ yield item
93
+ empty = False
94
+ if not empty :
95
+ yield fullpath
97
96
elif self .filter (fullpath ):
98
97
yield fullpath
99
98
else :
100
99
self .logger .debug ("Ignoring %s (filter)" , fullpath )
101
100
102
-
103
- if os .environ .get ("CODEQL_EXTRACTOR_PYTHON_OPTION_SKIP_HIDDEN_DIRECTORIES" , "false" ) == "false" :
104
-
105
- def is_hidden (path ):
106
- return False
107
-
108
- elif os .name == 'nt' :
109
- import ctypes
110
-
111
- def is_hidden (path ):
112
- #Magical windows code
113
- try :
114
- attrs = ctypes .windll .kernel32 .GetFileAttributesW (str (path ))
115
- if attrs == - 1 :
116
- return False
117
- if attrs & 2 :
118
- return True
119
- except Exception :
120
- #Not sure what to log here, probably best to carry on.
121
- pass
122
- return os .path .basename (path ).startswith ("." )
123
-
124
- else :
125
-
126
- def is_hidden (path ):
127
- return os .path .basename (path ).startswith ("." )
128
-
129
-
130
101
def exclude_filter_from_options (options ):
131
102
if options .exclude_package :
132
103
choices = '|' .join (mod .replace ('.' , r'\.' ) for mod in options .exclude_package )
You can’t perform that action at this time.
0 commit comments