Skip to content

Commit 2f73b51

Browse files
committed
rename: use Uri.toPath
1 parent 6dfbffc commit 2f73b51

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

analysis/src/Commands.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ let rename ~full ~pos ~newName ~debug =
193193
let fileRenames =
194194
referencesToToplevelModules
195195
|> List.map (fun uri ->
196-
let path = Uri.toString uri in
196+
let path = Uri.toPath uri in
197197
let dir =
198198
match Filename.dirname path with
199199
| "." -> ""
@@ -203,7 +203,9 @@ let rename ~full ~pos ~newName ~debug =
203203
Filename.concat dir (newName ^ Filename.extension path)
204204
in
205205
`RenameFile
206-
(Lsp.Types.RenameFile.create ~newUri:(newPath |> Uri.fromPath)
206+
(Lsp.Types.RenameFile.create
207+
~newUri:
208+
(newPath |> Uri.fromPath |> Uri.toString |> Uri.fromPath)
207209
~oldUri:(uri |> Uri.toString |> Uri.fromString)
208210
()))
209211
in

0 commit comments

Comments
 (0)