Skip to content

Commit

Permalink
Merge pull request #1 from termanix/patch-9
Browse files Browse the repository at this point in the history
Update spider_plus.py for both with and without dots
  • Loading branch information
Joytide authored Dec 5, 2024
2 parents af80015 + 3ca3481 commit bed1867
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nxc/modules/spider_plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,9 @@ def parse_file(self, share_name, file_path, file_info):
# Check file extension filter.
_, file_extension = splitext(file_path)
if file_extension:
if file_extension.startswith(".") and len(file_extension) > 1:
file_extension = file_extension[1:]
file_extension = file_extension.lstrip(".")
self.stats["file_exts"].add(file_extension.lower())
if file_extension.lower() in self.exclude_exts:
if file_extension.lower() in [ext.lstrip(".") for ext in self.exclude_exts]:
self.logger.info(f'The file "{file_path}" has an excluded extension.')
self.stats["num_files_filtered"] += 1
return
Expand Down

0 comments on commit bed1867

Please sign in to comment.