This commit is contained in:
Martin Aeschlimann
2019-02-15 16:20:20 +01:00
parent a06dbfc3f2
commit 833fc7aa99
2 changed files with 6 additions and 3 deletions

View File

@@ -326,14 +326,17 @@ export class ExtHostWorkspaceProvider {
getRelativePath(pathOrUri: string | vscode.Uri, includeWorkspace?: boolean): string | undefined {
let resource: URI | undefined;
let path: string | undefined;
if (typeof pathOrUri === 'string') {
resource = URI.file(pathOrUri);
path = pathOrUri;
} else if (typeof pathOrUri !== 'undefined') {
resource = pathOrUri;
path = pathOrUri.fsPath;
}
if (!resource) {
return undefined;
return path;
}
const folder = this.getWorkspaceFolder(
@@ -342,7 +345,7 @@ export class ExtHostWorkspaceProvider {
);
if (!folder) {
return resource.fsPath;
return path;
}
if (typeof includeWorkspace === 'undefined' && this._actualWorkspace) {