rhaiscript / lsp

Language server for Rhai.
Apache License 2.0
43 stars 4 forks source link

Handle windows file paths correctly #60

Closed tamasfe closed 2 years ago

tamasfe commented 2 years ago

We should normalize all file paths under windows including the ones in URLs before we work with them:

schungx commented 2 years ago

Oops sorry, I believe canonical returns the UNC standard path format which is like \\?\c\Git\rhai

The file:///c:/Git/rhai format is the URI format, but I believe there are ways to translate between the two.

I'd suggest keeping to the URI format, which should work on both Windows and Unix. In fact, that's what I usually work with but I suppose that is used in web requests.

Otherwise, use the canonical format will be a fallback.