Configurable global storage path via VSCODE_GLOBAL_STORAGE

This commit is contained in:
Radek Simko 2021-10-15 17:34:43 +01:00
parent d33c0621bc
commit 20491b1004
No known key found for this signature in database
GPG key ID: 1F1C84FE689A88D7

View file

@ -85,7 +85,14 @@ export abstract class AbstractNativeEnvironmentService implements INativeEnviron
get machineSettingsResource(): URI { return joinPath(URI.file(join(this.userDataPath, 'Machine')), 'settings.json'); }
@memoize
get globalStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'globalStorage'); }
get globalStorageHome(): URI {
const globalStoragePath = env['VSCODE_GLOBAL_STORAGE'];
if (globalStoragePath) {
return URI.file(globalStoragePath);
}
return URI.joinPath(this.appSettingsHome, 'globalStorage');
}
@memoize
get workspaceStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'workspaceStorage'); }