Skip to content

Commit

Permalink
fix bug of exlcude option on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Wonjae Park <[email protected]>
  • Loading branch information
JustinWonjaePark committed Jan 22, 2025
1 parent 1c005e1 commit 3bd07b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fosslight_util/exclude.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def excluding_files(patterns: list[str], path_to_scan: str) -> list[str]:
# Replace backslash with slash
normalized_patterns = []
for pattern in patterns:
pattern = pattern.replace('\\', '/')
if pattern.endswith('/') or pattern.endswith('/*'):
pattern = pattern.rstrip('/*')
pattern = pattern.replace('\\', '/')
normalized_patterns.append(pattern)

# Traverse directories
Expand Down

0 comments on commit 3bd07b3

Please sign in to comment.