Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/vs
diff options
context:
space:
mode:
authorSandeep Somavarapu <sasomava@microsoft.com>2022-07-28 09:56:31 +0300
committerGitHub <noreply@github.com>2022-07-28 09:56:31 +0300
commit3f502b2bcff29d983b67c5a145ad10524c080d49 (patch)
treecb15c6f1ade1942b3186aa317704900b85eb4037 /src/vs
parentc4d99090fcfb199f12965594952c81fbdd6f5a7f (diff)
Fix #154485 (#156533)
Diffstat (limited to 'src/vs')
-rw-r--r--src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts b/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts
index 5fab982a11c..7b124b207ca 100644
--- a/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts
+++ b/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts
@@ -87,7 +87,16 @@ export class UserDataProfileManagementService extends Disposable implements IUse
}
private async enterProfile(profile: IUserDataProfile, preserveData: boolean, reloadMessage?: string): Promise<void> {
- if (this.environmentService.remoteAuthority) {
+ const isRemoteWindow = !!this.environmentService.remoteAuthority;
+
+ if (!isRemoteWindow) {
+ this.extensionService.stopExtensionHosts();
+ }
+
+ // In a remote window update current profile before reloading so that data is preserved from current profile if asked to preserve
+ await this.userDataProfileService.updateCurrentProfile(profile, preserveData);
+
+ if (isRemoteWindow) {
const result = await this.dialogService.confirm({
type: 'info',
message: reloadMessage ?? localize('reload message', "Switching a settings profile requires reloading VS Code."),
@@ -96,12 +105,9 @@ export class UserDataProfileManagementService extends Disposable implements IUse
if (result.confirmed) {
await this.hostService.reload();
}
- return;
+ } else {
+ await this.extensionService.startExtensionHosts();
}
-
- this.extensionService.stopExtensionHosts();
- await this.userDataProfileService.updateCurrentProfile(profile, preserveData);
- await this.extensionService.startExtensionHosts();
}
}