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

Double backslash escaping in Windows global schema #13

Closed
wants to merge 1 commit into from

Conversation

Fixkey
Copy link

@Fixkey Fixkey commented Sep 19, 2022

Fix for #12

globber.test(vFile.path) returned false in Windows systems. It's because Windows uses \ as a directory separator. I found that adding an additional "\" before making a Regex fixes the issue. Windows doesn't allow for \ in filenames, so hopefully, this should be enough.

I've tested the demo and some of my other tests and now it works as expected. This PR shouldn't affect systems other than Windows.

Thanks

@JulianCataldo
Copy link
Owner

JulianCataldo commented Sep 19, 2022

Thx for your input Fixkey!
I'm not super fan of the globbing implementation anyway.
I'm thinking about swapping the current glob utility with something more robust / universal.

Will try your fix ASAP.
Cheers

JulianCataldo added a commit that referenced this pull request Sep 22, 2022
This will be more robust and universal.
Especially for Windows paths with `\`.

Closes #12 #13
github-actions bot pushed a commit that referenced this pull request Sep 22, 2022
## [3.7.3](v3.7.2...v3.7.3) (2022-09-22)

### Bug Fixes

* swap custom `glob-to-regexp` w. `minimatch` ([e7022d6](e7022d6)), closes [#12](#12) [#13](#13)
@JulianCataldo
Copy link
Owner

Using minimatch now.

v3.7.2...v3.7.3

I didn't tried with Windows, but it's supposed to be good :)

@Fixkey Fixkey closed this Sep 27, 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.

None yet

2 participants