|
5 | 5 |
|
6 | 6 | import { ThrottledDelayer } from 'vs/base/common/async';
|
7 | 7 | import { VSBuffer } from 'vs/base/common/buffer';
|
8 |
| -import { join } from 'vs/base/common/path'; |
9 | 8 | import { joinPath } from 'vs/base/common/resources';
|
10 | 9 | import { isUndefined, isUndefinedOrNull } from 'vs/base/common/types';
|
11 | 10 | import { URI } from 'vs/base/common/uri';
|
12 |
| -import { Promises } from 'vs/base/node/pfs'; |
13 | 11 | import { IEnvironmentMainService } from 'vs/platform/environment/electron-main/environmentMainService';
|
14 | 12 | import { FileOperationError, FileOperationResult, IFileService } from 'vs/platform/files/common/files';
|
15 | 13 | import { ILogService } from 'vs/platform/log/common/log';
|
@@ -153,29 +151,19 @@ export class StateMainService implements IStateMainService {
|
153 | 151 |
|
154 | 152 | private static readonly STATE_FILE = 'storage.json';
|
155 | 153 |
|
156 |
| - private readonly legacyStateFilePath = URI.file(join(this.environmentMainService.userDataPath, StateMainService.STATE_FILE)); |
157 | 154 | private readonly stateFilePath = joinPath(this.environmentMainService.globalStorageHome, StateMainService.STATE_FILE);
|
158 | 155 |
|
159 | 156 | private readonly fileStorage: FileStorage;
|
160 | 157 |
|
161 | 158 | constructor(
|
162 | 159 | @IEnvironmentMainService private readonly environmentMainService: IEnvironmentMainService,
|
163 |
| - @ILogService private readonly logService: ILogService, |
| 160 | + @ILogService logService: ILogService, |
164 | 161 | @IFileService fileService: IFileService
|
165 | 162 | ) {
|
166 | 163 | this.fileStorage = new FileStorage(this.stateFilePath, logService, fileService);
|
167 | 164 | }
|
168 | 165 |
|
169 | 166 | 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 |
| - |
179 | 167 | return this.fileStorage.init();
|
180 | 168 | }
|
181 | 169 |
|
|
0 commit comments