more Windows path fix - #77
Conversation
…ng encoding of the rest
Andriamanitra
left a comment
There was a problem hiding this comment.
We should keep this check for Windows, otherwise the gsubs can mess up Linux paths (both /C:/whatever and /C:\\what\ever/file are valid paths that we should not mess with on Linux).
if package.config:sub(1,1) == "\\" then
-- do windows-specific stuff
else
-- do the usual stuff
endCo-authored-by: Mikko <Andriamanitra@users.noreply.github.com>
Good point - I think the reason I changed was when testing - there was no package.config set. I this assumed set for everyone that uses the plugin? Edit I get this error when trying Lua API error: main:1645: attempt to index a non-table object(nil) with key 'sub'
stack traceback:
main:1645: in function 'fileUriFromAbsPath'
main:288: in function 'initialize'
main:198: in function 'func'
main:125: in main chunk
[G]: ?However, for me the following alternative works local runtime = import("runtime")
(...)
if runtime.GOOS == "windows" thenBut this might be just something wrong on my end. |
Weird, I'm not sure why |
|
Sorry for the delay @Andriamanitra - I updated the PR now. |
No description provided.