提交 209e0887 编写于 作者: D Daniel Imms

Optimize calls to BackupService.loadSync

上级 93385fba
......@@ -72,15 +72,14 @@ export class BackupService implements IBackupMainService {
) {
this.backupHome = environmentService.backupHome;
this.workspacesJsonPath = environmentService.backupWorkspacesPath;
this.loadSync();
}
public getWorkspaceBackupPathsSync(): string[] {
this.loadSync();
return this.workspacesJsonContent.folderWorkspaces;
}
public pushWorkspaceBackupPathsSync(workspaces: Uri[]): void {
this.loadSync();
workspaces.forEach(workspace => {
// Hot exit is disabled for empty workspaces
if (!workspace) {
......@@ -95,7 +94,6 @@ export class BackupService implements IBackupMainService {
}
public removeWorkspaceBackupPathSync(workspace: Uri): void {
this.loadSync();
if (!this.workspacesJsonContent.folderWorkspaces) {
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册