Skip to content

Commit ae59067

Browse files
authored
fix syncing profiles (microsoft#209336)
fix microsoft#208710
1 parent b831801 commit ae59067

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/vs/platform/userDataSync/common/userDataProfilesManifestSync.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ export class UserDataProfilesManifestSynchroniser extends AbstractSynchroniser i
187187

188188
if (localChange !== Change.None) {
189189
await this.backupLocal(stringifyLocalProfiles(this.getLocalUserDataProfiles(), false));
190+
await Promise.all(local.removed.map(async profile => {
191+
this.logService.trace(`${this.syncResourceLogLabel}: Removing '${profile.name}' profile...`);
192+
await this.userDataProfilesService.removeProfile(profile);
193+
this.logService.info(`${this.syncResourceLogLabel}: Removed profile '${profile.name}'.`);
194+
}));
190195
const promises: Promise<any>[] = [];
191196
for (const profile of local.added) {
192197
promises.push((async () => {
@@ -195,13 +200,6 @@ export class UserDataProfilesManifestSynchroniser extends AbstractSynchroniser i
195200
this.logService.info(`${this.syncResourceLogLabel}: Created profile '${profile.name}'.`);
196201
})());
197202
}
198-
for (const profile of local.removed) {
199-
promises.push((async () => {
200-
this.logService.trace(`${this.syncResourceLogLabel}: Removing '${profile.name}' profile...`);
201-
await this.userDataProfilesService.removeProfile(profile);
202-
this.logService.info(`${this.syncResourceLogLabel}: Removed profile '${profile.name}'.`);
203-
})());
204-
}
205203
for (const profile of local.updated) {
206204
const localProfile = this.userDataProfilesService.profiles.find(p => p.id === profile.id);
207205
if (localProfile) {

0 commit comments

Comments
 (0)