Skip to content

Commit 39c7aa2

Browse files
author
coresoftware dev
committed
fix hfh extension filter bug
1 parent aed0fe7 commit 39c7aa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scanoss/file_filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def _should_skip_file(self, file_rel_path: str) -> bool: # noqa: PLR0911
551551
bool: True if file should be skipped, False otherwise
552552
"""
553553
file_name = os.path.basename(file_rel_path)
554-
554+
DEFAULT_SKIPPED_EXT_LIST = {} if self.is_folder_hashing_scan else DEFAULT_SKIPPED_EXT
555555
DEFAULT_SKIPPED_FILES_LIST = DEFAULT_SKIPPED_FILES_HFH if self.is_folder_hashing_scan else DEFAULT_SKIPPED_FILES
556556

557557
if not self.hidden_files_folders and file_name.startswith('.'):
@@ -565,7 +565,7 @@ def _should_skip_file(self, file_rel_path: str) -> bool: # noqa: PLR0911
565565
self.print_debug(f'Skipping file: {file_rel_path} (matches default skip file)')
566566
return True
567567
# Look for file endings
568-
for ending in DEFAULT_SKIPPED_EXT:
568+
for ending in DEFAULT_SKIPPED_EXT_LIST:
569569
if file_name_lower.endswith(ending):
570570
self.print_debug(f'Skipping file: {file_rel_path} (matches default skip ending: {ending})')
571571
return True

0 commit comments

Comments
 (0)