Skip to content

Commit 517962e

Browse files
authored
Use Uri.fsPath instead of Uri.path to use with Node.js filesystem APIs (#1929)
1 parent 040518a commit 517962e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
- Fix Windows path handling regression introduced in 1.32.1 by using
6+
`Uri.fsPath` instead of `Uri.path` in workspace root detection, preventing
7+
LSP start failures (`ENOENT -4058`). (#1929)
8+
59
## 1.32.1
610

711
- Fix DPM error when invoking `ocamlc --version` without a working directory by

src/sandbox.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ let workspace_root () =
6262
match Workspace.workspaceFolders () with
6363
| [] -> None
6464
| [ workspace_folder ] ->
65-
Some (workspace_folder |> WorkspaceFolder.uri |> Uri.path |> Path.of_string)
65+
Some (workspace_folder |> WorkspaceFolder.uri |> Uri.fsPath |> Path.of_string)
6666
| _ ->
6767
(* We don't support multiple workspace roots at the moment *)
6868
None

0 commit comments

Comments
 (0)