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

Handle linux paths on windows. #16

Closed
wants to merge 1 commit into from
Closed

Conversation

dsherret
Copy link

For #14. I wouldn't be surprised if someone were depending on the previous behaviour, so this seems like a breaking change in behaviour.

This means it will work the same on linux and windows.

@e-cloud
Copy link

e-cloud commented Nov 3, 2018

@jonschlinkert could you have a review?

@jonschlinkert
Copy link
Member

thanks for the ping, and sorry for the delay. I get heartburn from path issues, especially when they are Windows related, and even more so when they are for Linux on Windows (jk!).

so this seems like a breaking change in behaviour.

Is this always desired behavior though? Should we expose an option to unixify the path root?

@dsherret
Copy link
Author

dsherret commented Nov 5, 2018

@jonschlinkert I think it would be easiest if people provide that by doing the following:

toAbsoluteGlob("**/*.txt", { root: path.resolve("/") }));

That doesn't require an extra option. What do you think?

Side note: In nodejs it seems that / will be the current drive letter. So I can do fs.readFileSync("/somefile.txt", "utf8") and it will read the file at C:\somefile.txt. I believe the main problem would be if someone provided / previously for root and was passing that glob to some other code that was relying on it having a drive letter.

@dsherret dsherret closed this Jan 25, 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.

3 participants