From 5bf21a60b655546857f8162fa9b14a60d0e52280 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 13 Dec 2016 09:47:33 +0100 Subject: [PATCH] don't join with undefined, #17089 --- src/vs/vscode.d.ts | 2 +- src/vs/workbench/api/node/extHostExtensionService.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 398d1365ae3..0ce17d3b0a3 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3330,7 +3330,7 @@ declare module 'vscode' { * Use [`workspaceState`](#ExtensionContext.workspaceState) or * [`globalState`](#ExtensionContext.globalState) to store key value data. */ - storagePath: string; + storagePath: string | undefined; } /** diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 78ab305479e..3b8e97d6165 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -119,8 +119,10 @@ class ExtensionStoragePath { return this._ready; } - get value(): string { - return this._value; + value(extension: IExtensionDescription): string { + if (this._value) { + return paths.join(this._value, extension.id); + } } private _getOrCreateWorkspaceStoragePath(): TPromise { @@ -272,7 +274,7 @@ export class ExtHostExtensionService extends AbstractExtensionService { return paths.normalize(paths.join(extensionDescription.extensionFolderPath, relativePath), true); } }); }); -- GitLab