Closed havardjohn closed 2 years ago
Will this work for versions pre that comit as well? Otherwise I think we should keep the empty check in.
isRootDir
considers ""
root dir since Nim version 0.20 or before, so it's safe to remove the empty check.
The issue is that an infinite loop occurs in every run of nimlsp following this commit in Nim: 23e0160af283bb0bb573a86145e6c1c792780d49.
splitFile
has changed behavior on Windows.splitFile("D:").dir
now returns "D:" instead of "". This behavior is now consistent with Linux'ssplitFile
wheresplitFile("/").dir
returns/
.The condition
path != "/"
in nimlsp code assumes that that the root component is a Linux root component. This adds support for Windows roots by using the platform-independentisRootDir
proc.path.len > 0
is removed because""
counts as a root dir.Fixes: #140