Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exclusion folder check for subdirectories and for Windows #2012

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dadoonet
Copy link
Owner

There were 2 issues here:

  • We are comparing a folder name like */foo/* with a virtual dir name which is something like /foo or /bar/foo. It's missing the / at the end when it's a directory.
  • On windows, the exclusion for a dir named \foo\arbets does not match the exclusion */arbets/* because of the / vs \ mismatch

This commit fixes this behavior.

Closes #1974.

@dadoonet dadoonet self-assigned this Feb 10, 2025
@dadoonet dadoonet added bug For confirmed bugs component:core labels Feb 10, 2025
There were 2 issues here:

* We are comparing a folder name like `*/foo/*` with a virtual dir name which is something like `/foo` or `/bar/foo`. It's missing the `/` at the end when it's a directory.
* On windows, the exclusion for a dir named `\foo\arbets` does not match the exclusion `*/arbets/*` because of the `/` vs `\` mismatch

This commit fixes this behavior.

Closes #1974.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For confirmed bugs component:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fscrawler ignores exclusion folder for subdirectories
1 participant