Skip to content

Correct path.sep for POSIX LuaJIT consumers#409

Merged
Conni2461 merged 1 commit intonvim-lua:masterfrom
pfmooney:posix-pathsep
Sep 27, 2022
Merged

Correct path.sep for POSIX LuaJIT consumers#409
Conni2461 merged 1 commit intonvim-lua:masterfrom
pfmooney:posix-pathsep

Conversation

@pfmooney
Copy link
Copy Markdown
Contributor

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 posix to the existing comparison list, I'm happy to update the PR. I don't have a Windows machine to test one.

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.
@Conni2461
Copy link
Copy Markdown
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

@pfmooney
Copy link
Copy Markdown
Contributor Author

I have a windows vm to test stuff like this. Ill do it in the next couple of days

Much appreciated!

@Conni2461
Copy link
Copy Markdown
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

@Conni2461 Conni2461 merged commit 9e7c628 into nvim-lua:master 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.

2 participants