Skip to content

Commit 9e7c628

Browse files
authored
fix: Correct path.sep for POSIX LuaJIT consumers (#409)
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.
1 parent 87f7156 commit 9e7c628

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/plenary/path.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ path.home = vim.loop.os_homedir()
2121
path.sep = (function()
2222
if jit then
2323
local os = string.lower(jit.os)
24-
if os == "linux" or os == "osx" or os == "bsd" then
24+
if os ~= "windows" then
2525
return "/"
2626
else
2727
return "\\"

0 commit comments

Comments
 (0)