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 duplicated result when using globstar #231

Merged
merged 2 commits into from Feb 2, 2022
Merged

Fix duplicated result when using globstar #231

merged 2 commits into from Feb 2, 2022

Conversation

jopemachine
Copy link
Contributor

Fixes #175.

I updated createFilterFunction using normalized path string instead of just path.

So, the below code lines return the commented values instead of [ 'a/b', './a/b' ].

// below code returns [ './a/b' ]
console.log(globbySync(['./a/**', './a']));

// below code returns [ 'a/b' ]
console.log(globbySync(['./a', './a/**']));

@sindresorhus
Copy link
Owner

Can you add a test?

@jopemachine
Copy link
Contributor Author

jopemachine commented Feb 1, 2022

Can you add a test?

Sure, I just made a test about this. Would this test be enough to test this case?

@sindresorhus sindresorhus changed the title Fix globstar duplicated result bug Fix duplicated result when using globstar Feb 2, 2022
@sindresorhus sindresorhus merged commit f9d35ae into sindresorhus:main Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated results when directory specified with globstar
2 participants