Skip to content

Commit f3a57f6

Browse files
authored
debt - remove state migration (microsoft#151402)
1 parent bf757ca commit f3a57f6

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55

66
import { ThrottledDelayer } from 'vs/base/common/async';
77
import { VSBuffer } from 'vs/base/common/buffer';
8-
import { join } from 'vs/base/common/path';
98
import { joinPath } from 'vs/base/common/resources';
109
import { isUndefined, isUndefinedOrNull } from 'vs/base/common/types';
1110
import { URI } from 'vs/base/common/uri';
12-
import { Promises } from 'vs/base/node/pfs';
1311
import { IEnvironmentMainService } from 'vs/platform/environment/electron-main/environmentMainService';
1412
import { FileOperationError, FileOperationResult, IFileService } from 'vs/platform/files/common/files';
1513
import { ILogService } from 'vs/platform/log/common/log';
@@ -153,29 +151,19 @@ export class StateMainService implements IStateMainService {
153151

154152
private static readonly STATE_FILE = 'storage.json';
155153

156-
private readonly legacyStateFilePath = URI.file(join(this.environmentMainService.userDataPath, StateMainService.STATE_FILE));
157154
private readonly stateFilePath = joinPath(this.environmentMainService.globalStorageHome, StateMainService.STATE_FILE);
158155

159156
private readonly fileStorage: FileStorage;
160157

161158
constructor(
162159
@IEnvironmentMainService private readonly environmentMainService: IEnvironmentMainService,
163-
@ILogService private readonly logService: ILogService,
160+
@ILogService logService: ILogService,
164161
@IFileService fileService: IFileService
165162
) {
166163
this.fileStorage = new FileStorage(this.stateFilePath, logService, fileService);
167164
}
168165

169166
async init(): Promise<void> {
170-
try {
171-
// TODO@bpasero remove legacy migration eventually
172-
await Promises.move(this.legacyStateFilePath.fsPath, this.stateFilePath.fsPath);
173-
} catch (error) {
174-
if (error.code !== 'ENOENT') {
175-
this.logService.error(error);
176-
}
177-
}
178-
179167
return this.fileStorage.init();
180168
}
181169

0 commit comments

Comments
 (0)