diff options
Diffstat (limited to 'pyGHDL/lsp/lsp.py')
-rw-r--r-- | pyGHDL/lsp/lsp.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pyGHDL/lsp/lsp.py b/pyGHDL/lsp/lsp.py index d76c04616..49c5502e3 100644 --- a/pyGHDL/lsp/lsp.py +++ b/pyGHDL/lsp/lsp.py @@ -47,8 +47,12 @@ def path_from_uri(uri): def path_to_uri(path): # Convert path to file uri (add html like head part) + # :param path: is an absolute path. if is_windows: - return "file:///" + quote(path.replace("\\", "/")) + # On windows, do not quote the colon after the driver letter, as + # it is not quoted in uri from the client. + path = path.replace("\\", "/") + return "file:///" + path[:2] + quote(path[2:]) else: return "file://" + quote(path) |