提交 5bf21a60 编写于 作者: J Johannes Rieken

don't join with undefined, #17089

上级 a70621b5
......@@ -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;
}
/**
......
......@@ -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<string> {
......@@ -272,7 +274,7 @@ export class ExtHostExtensionService extends AbstractExtensionService<ExtHostExt
workspaceState,
subscriptions: [],
get extensionPath() { return extensionDescription.extensionFolderPath; },
storagePath: paths.join(this._storagePath.value, extensionDescription.id),
storagePath: this._storagePath.value(extensionDescription),
asAbsolutePath: (relativePath: string) => { return paths.normalize(paths.join(extensionDescription.extensionFolderPath, relativePath), true); }
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册