Skip to content

Commit

Permalink
Fix handling of project paths on Windows
Browse files Browse the repository at this point in the history
A regression introduced in BetterThanTomorrow#2020 and BetterThanTomorrow#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 BetterThanTomorrow#2054
  • Loading branch information
julienvincent committed Feb 2, 2023
1 parent 89c1f5f commit fea1d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/project-root.ts
Expand Up @@ -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),
Expand Down

0 comments on commit fea1d66

Please sign in to comment.