From 56424b51dde6add485ed4174b5ad9bfcefcb7819 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Sat, 20 Nov 2021 14:59:59 +0100 Subject: [PATCH] Use platform specific path Retrieves the platform specific path when getting the project path, using the right path separators on each platform. --- src/project-select.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/project-select.ts b/src/project-select.ts index 62000ef..0128ae4 100644 --- a/src/project-select.ts +++ b/src/project-select.ts @@ -1,7 +1,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -export interface ProjectLocation{ +export interface ProjectLocation { relativeFilePath: string; absoluteFilePath: string; relativeProjectPath: string; @@ -13,9 +13,9 @@ export async function findProjectFiles(): Promise { return projectFiles.map((x) => { return { relativeFilePath: vscode.workspace.asRelativePath(x), - absoluteFilePath: x.path, + absoluteFilePath: x.fsPath, relativeProjectPath: path.dirname(vscode.workspace.asRelativePath(x)), - absoluteProjectPath: path.dirname(x.path), + absoluteProjectPath: path.dirname(x.fsPath), }; }); }