mirror of
https://github.com/godotengine/godot-csharp-vscode.git
synced 2026-01-04 18:09:54 +03:00
Use platform specific path
Retrieves the platform specific path when getting the project path, using the right path separators on each platform.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
export interface ProjectLocation{
|
export interface ProjectLocation {
|
||||||
relativeFilePath: string;
|
relativeFilePath: string;
|
||||||
absoluteFilePath: string;
|
absoluteFilePath: string;
|
||||||
relativeProjectPath: string;
|
relativeProjectPath: string;
|
||||||
@@ -13,9 +13,9 @@ export async function findProjectFiles(): Promise<ProjectLocation[]> {
|
|||||||
return projectFiles.map((x) => {
|
return projectFiles.map((x) => {
|
||||||
return {
|
return {
|
||||||
relativeFilePath: vscode.workspace.asRelativePath(x),
|
relativeFilePath: vscode.workspace.asRelativePath(x),
|
||||||
absoluteFilePath: x.path,
|
absoluteFilePath: x.fsPath,
|
||||||
relativeProjectPath: path.dirname(vscode.workspace.asRelativePath(x)),
|
relativeProjectPath: path.dirname(vscode.workspace.asRelativePath(x)),
|
||||||
absoluteProjectPath: path.dirname(x.path),
|
absoluteProjectPath: path.dirname(x.fsPath),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user