Skip to content

Commit d501acf

Browse files
committed
fixes for backupMainService
1 parent 4173200 commit d501acf

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/vs/platform/backup/electron-main/backupMainService.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class BackupMainService implements IBackupMainService {
182182
workspaceFolders = backups.folderWorkspaces.map(f => URI.file(f));
183183
}
184184
} catch (e) {
185-
// ignore URI parsing expeptions
185+
// ignore URI parsing exceptions
186186
}
187187
this.folderWorkspaces = this.validateFolders(workspaceFolders);
188188

@@ -264,7 +264,6 @@ export class BackupMainService implements IBackupMainService {
264264
return [];
265265
}
266266

267-
268267
const result: string[] = [];
269268
const seen: { [id: string]: boolean } = Object.create(null);
270269

@@ -281,7 +280,7 @@ export class BackupMainService implements IBackupMainService {
281280
if (this.hasBackupsSync(backupPath)) {
282281
result.push(backupFolder);
283282
} else {
284-
this.deleteStaleBackup(backupFolder);
283+
this.deleteStaleBackup(backupPath);
285284
}
286285
}
287286
}
@@ -350,7 +349,6 @@ export class BackupMainService implements IBackupMainService {
350349
folderURIWorkspaces: this.folderWorkspaces.map(f => f.toString()),
351350
emptyWorkspaces: this.emptyWorkspaces
352351
};
353-
354352
extfs.writeFileAndFlushSync(this.workspacesJsonPath, JSON.stringify(backups));
355353
} catch (ex) {
356354
this.logService.error(`Backup: Could not save workspaces.json: ${ex.toString()}`);

0 commit comments

Comments
 (0)