Correct path.sep for POSIX LuaJIT consumers#409
Merged
Conni2461 merged 1 commit intonvim-lua:masterfrom Sep 27, 2022
Merged
Conversation
The existing path.sep logic tested explicitly for Linux, OSX, or BSD OSes as queried through LuaJIT (if present). This left out other POSIX OSes, which will almost certainly use the UNIX-style forward slash, rather than backslash. Since Windows is the odd one out when it comes to path separators, using it for the comparison should provide better coverage long-term.
Collaborator
|
thanks :) ci failure is unrelated. I have a windows vm to test stuff like this. Ill do it in the next couple of days |
Contributor
Author
Much appreciated! |
Collaborator
|
should work, at least for windows 10. although i have not tested weird things, like using mingw or so, because i have no idea how to 😬 Thanks again :) and sorry for the delay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing path.sep logic tested explicitly for Linux, OSX, or BSD OSes as queried through LuaJIT (if present). This left out other POSIX OSes, which will almost certainly use the UNIX-style forward slash, rather than backslash.
Since Windows is the odd one out when it comes to path separators, using it for the comparison should provide better coverage long-term. If you'd prefer I simply add
posixto the existing comparison list, I'm happy to update the PR. I don't have a Windows machine to test one.