Skip to content

Commit b4c57ff

Browse files
authored
1 parent 5506e5e commit b4c57ff

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/vs/platform/userDataProfile/common/userDataProfile.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,12 @@ export class UserDataProfilesService extends Disposable implements IUserDataProf
415415
if (!this.enabled) {
416416
return;
417417
}
418-
const stat = await this.fileService.resolve(this.profilesHome);
419-
await Promise.all((stat.children || [])
420-
.filter(child => child.isDirectory && this.profiles.every(p => !this.uriIdentityService.extUri.isEqual(p.location, child.resource)))
421-
.map(child => this.fileService.del(child.resource, { recursive: true })));
418+
if (await this.fileService.exists(this.profilesHome)) {
419+
const stat = await this.fileService.resolve(this.profilesHome);
420+
await Promise.all((stat.children || [])
421+
.filter(child => child.isDirectory && this.profiles.every(p => !this.uriIdentityService.extUri.isEqual(p.location, child.resource)))
422+
.map(child => this.fileService.del(child.resource, { recursive: true })));
423+
}
422424
}
423425

424426
async cleanUpTransientProfiles(): Promise<void> {

0 commit comments

Comments
 (0)