File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1141,6 +1141,9 @@ def build_file_list_with_os_walk(
11411141) -> Iterable [str ]:
11421142 all_files = []
11431143 for filename in files :
1144+ # ignore hidden files
1145+ if is_hidden (root , check_hidden ):
1146+ continue
11441147 if os .path .isdir (filename ):
11451148 for root , dirs , dirfiles in os .walk (filename ):
11461149 if glob_match .match (root ): # skip (absolute) directories
@@ -1159,6 +1162,14 @@ def build_file_list_with_os_walk(
11591162 if glob_match .match (fname ): # skip paths
11601163 continue
11611164 all_files .append (fname )
1165+
1166+ # skip (relative) directories
1167+ dirs [:] = [
1168+ dir_
1169+ for dir_ in dirs
1170+ if not glob_match .match (dir_ )
1171+ and not is_hidden (dir_ , check_hidden )
1172+ ]
11621173 elif not glob_match .match (filename ) and not is_hidden (filename , check_hidden ):
11631174 all_files .append (filename )
11641175 return all_files
You can’t perform that action at this time.
0 commit comments