diff --git a/src/vs/platform/extensionManagement/node/extensionLifecycle.ts b/src/vs/platform/extensionManagement/node/extensionLifecycle.ts index 9238c8e500f..9b81e959837 100644 --- a/src/vs/platform/extensionManagement/node/extensionLifecycle.ts +++ b/src/vs/platform/extensionManagement/node/extensionLifecycle.ts @@ -130,6 +130,6 @@ export class ExtensionsLifecycle extends Disposable { } private getExtensionStoragePath(extension: ILocalExtension): string { - return posix.join(this.environmentService.globalStorageHome, extension.identifier.id.toLocaleLowerCase()); + return posix.join(this.environmentService.globalStorageHome, extension.galleryIdentifier.id.toLowerCase()); } } diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 367335194a6..f896c56d5af 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4669,6 +4669,15 @@ declare module 'vscode' { */ storagePath: string | undefined; + /** + * An absolute file path in which the extension can store gloabal state. + * The directory might not exist on disk and creation is + * up to the extension. However, the parent directory is guaranteed to be existent. + * + * Use [`globalState`](#ExtensionContext.globalState) to store key value data. + */ + globalStoragePath: string; + /** * An absolute file path of a directory in which the extension can create log files. * The directory might not exist on disk and creation is up to the extension. However, diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 2b0a298d872..edbf4b240fa 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1088,21 +1088,6 @@ declare module 'vscode' { } //#endregion - //#region Extension Context - export interface ExtensionContext { - - /** - * An absolute file path in which the extension can store gloabal state. - * The directory might not exist on disk and creation is - * up to the extension. However, the parent directory is guaranteed to be existent. - * - * Use [`globalState`](#ExtensionContext.globalState) to store key value data. - */ - globalStoragePath: string; - - } - //#endregion - //#region SignatureHelpContext active paramters - mjbvz export interface SignatureHelpContext { /** diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index e574496358e..2708455fc7a 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -19,7 +19,7 @@ import { ActivatedExtension, EmptyExtension, ExtensionActivatedByAPI, ExtensionA import { ExtHostLogService } from 'vs/workbench/api/node/extHostLogService'; import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; -import { IExtensionDescription, checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions'; +import { IExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry'; import { connectProxyResolver } from 'vs/workbench/node/proxyResolver'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; @@ -104,7 +104,7 @@ class ExtensionStoragePath { } globalValue(extension: IExtensionDescription): string { - return path.join(this._environment.globalStorageHome.fsPath, extension.identifier.value); + return path.join(this._environment.globalStorageHome.fsPath, extension.identifier.value.toLowerCase()); } private async _getOrCreateWorkspaceStoragePath(): Promise { @@ -422,7 +422,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { subscriptions: [], get extensionPath() { return extensionDescription.extensionLocation.fsPath; }, storagePath: this._storagePath.workspaceValue(extensionDescription), - get globalStoragePath(): string { checkProposedApiEnabled(extensionDescription); return that._storagePath.globalValue(extensionDescription); }, + globalStoragePath: this._storagePath.globalValue(extensionDescription), asAbsolutePath: (relativePath: string) => { return path.join(extensionDescription.extensionLocation.fsPath, relativePath); }, logPath: that._extHostLogService.getLogDirectory(extensionDescription.identifier) });