Skip to content

Commit

Permalink
Fix #159055
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Aug 24, 2022
1 parent 138c96b commit bad1d62
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/vs/platform/userDataProfile/common/userDataProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,12 @@ export class UserDataProfilesService extends Disposable implements IUserDataProf
if (!this.enabled) {
return;
}
const stat = await this.fileService.resolve(this.profilesHome);
await Promise.all((stat.children || [])
.filter(child => child.isDirectory && this.profiles.every(p => !this.uriIdentityService.extUri.isEqual(p.location, child.resource)))
.map(child => this.fileService.del(child.resource, { recursive: true })));
if (await this.fileService.exists(this.profilesHome)) {
const stat = await this.fileService.resolve(this.profilesHome);
await Promise.all((stat.children || [])
.filter(child => child.isDirectory && this.profiles.every(p => !this.uriIdentityService.extUri.isEqual(p.location, child.resource)))
.map(child => this.fileService.del(child.resource, { recursive: true })));
}
}

async cleanUpTransientProfiles(): Promise<void> {
Expand Down

0 comments on commit bad1d62

Please sign in to comment.