-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
Redundant //?/
#568
Comments
As long as the This is actually better, since it prevents "path too long" errors in many cases. What is the use case where you want |
OK, actually I didn't used posix option previously in v8 because I didn't needed. I just tried it in v10 to get forward slashes in the results. v8 returned results with forward slashes, which was nice, because results matched the pattern "formatting": > glob.sync('c:/users/tomasz/projects/builder/*.js');
[
'c:/users/tomasz/projects/builder/builder.js',
'c:/users/tomasz/projects/builder/index.js'
] And v10 returns "normalized" paths, which for me is inconvenient: > glob.sync('c:/users/tomasz/projects/builder/*.js');
[
'C:\\Users\\Tomasz\\Projects\\builder\\index.js',
'C:\\Users\\Tomasz\\Projects\\builder\\builder.js'
] My main use case is to be able to compare glob patterns with forward slashes in them with resulting paths. Often I calculate relative paths of files where the glob pattern starts. I have lot of patterns, all of them are somehow dynamic (concatenated from multiple parts). So I guess this is more of a complain, but this library requires to use forward slashes in patterns and returns paths that don't match the glob pattern formatting slashes, which requires additional normalizing steps or stripping the UNC thing. |
Would it be more convenient to use Returning paths with / on windows by default was a frequent complaint about older versions 😅 I'm not opposed to adding an option to strip the unc prefix, just trying to understand the reason for it. |
I guess proper paths on Windows are nice default. My needs are more advanced I suppose. I think I will solve it on my end then, as adding more options and maintaining them adds unnecessary burden on the maintainers. |
How to get paths with
/
as separator but without//?/
in returned paths on Windows? This worked before, in v8 I believe.The text was updated successfully, but these errors were encountered: