From fea1d66fd3749701134834345d64e4f70600bb07 Mon Sep 17 00:00:00 2001 From: Julien Vincent Date: Thu, 2 Feb 2023 15:07:04 -0700 Subject: [PATCH] Fix handling of project paths on Windows A regression introduced in #2020 and #2046 prevented the clojure-lsp and repl jack-in operations from working correctly on Windows hosts. This fixes the way we handle Uri's to make the unix and windows behaviours consistent. Fixes #2054 --- src/project-root.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/project-root.ts b/src/project-root.ts index fde154650..35cabcb09 100644 --- a/src/project-root.ts +++ b/src/project-root.ts @@ -58,7 +58,7 @@ export async function findProjectRootsWithReasons(params?: FindRootParams) { } const candidateUris = await vscode.workspace.findFiles(projectFilesGlob, excludeDirsGlob, 10000); const projectFilePaths = candidateUris.map((uri) => { - const dir = uri.with({ path: path.dirname(uri.fsPath) }); + const dir = vscode.Uri.parse(path.dirname(uri.path)); return { uri: dir, label: getPathRelativeToWorkspace(dir),