Skip to content

Commit a70083c

Browse files
committed
debt - move storage main into global storage
The other location one level up is being file watched and storage file changes constantly.
1 parent 3378eb3 commit a70083c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vs/code/node/cliProcessMain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class CliMain extends Disposable {
165165
commonProperties: (async () => {
166166
let machineId: string | undefined = undefined;
167167
try {
168-
const storageContents = await Promises.readFile(joinPath(environmentService.appSettingsHome, 'storage.json').fsPath);
168+
const storageContents = await Promises.readFile(joinPath(environmentService.globalStorageHome, 'storage.json').fsPath);
169169
machineId = JSON.parse(storageContents.toString())[machineIdKey];
170170
} catch (error) {
171171
if (error.code !== 'ENOENT') {

src/vs/platform/state/electron-main/stateMainService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export class StateMainService implements IStateMainService {
154154
private static readonly STATE_FILE = 'storage.json';
155155

156156
private readonly legacyStateFilePath = URI.file(join(this.environmentMainService.userDataPath, StateMainService.STATE_FILE));
157-
private readonly stateFilePath = joinPath(this.environmentMainService.appSettingsHome, StateMainService.STATE_FILE);
157+
private readonly stateFilePath = joinPath(this.environmentMainService.globalStorageHome, StateMainService.STATE_FILE);
158158

159159
private readonly fileStorage: FileStorage;
160160

0 commit comments

Comments
 (0)