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

Any glob without any globs returns forward slashes on Windows #76

Open
NotWearingPants opened this issue Sep 25, 2021 · 0 comments
Open

Comments

@NotWearingPants
Copy link

Usually and as per the documentation, input globs use forward slashes and the result paths use the native file separator.

But here are examples of globs on Windows which return forward slashes (a bug):

glob('C:/') //=> ['C:/']
glob('C:/Users') //=> ['C:/Users']
glob('/') //=> ['/']
glob('/Users') //=> ['/Users']
glob('./././') //=> ['./././']

Basically any glob which has no operators inside such as * or {} just returns the string as-is without any post-processing, even when it contains the wrong path separator. Note that the path must exist for it to not return zero results.

The result I expect is the same path I entered (not resolved or normalized or anything) just with the native path separator.

@NotWearingPants NotWearingPants changed the title An glob without any globs returns forward slashes on Windows A glob without any globs returns forward slashes on Windows Sep 26, 2021
@NotWearingPants NotWearingPants changed the title A glob without any globs returns forward slashes on Windows Any glob without any globs returns forward slashes on Windows Sep 26, 2021
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

No branches or pull requests

1 participant