From da65c6706320264bd4333837e8119dc097c8dee9 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Sat, 5 Jun 2021 20:58:06 +0200 Subject: [PATCH] #125527 --- .../services/workspaces/common/workspaceTrust.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts index 802aeff50fd..360edf0f75f 100644 --- a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts +++ b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts @@ -272,6 +272,11 @@ export class WorkspaceTrustManagementService extends Disposable implements IWork // Update workspace trust this._trustState.isTrusted = trusted; + // Reset acceptsOutOfWorkspaceFiles + if (!trusted) { + this._trustState.acceptsOutOfWorkspaceFiles = false; + } + // Run workspace trust transition participants await this._trustTransitionManager.participate(trusted); @@ -742,10 +747,6 @@ class WorkspaceTrustState { set isTrusted(value: boolean | undefined) { this._mementoObject[this._isTrustedKey] = value; - if (!value) { - this._mementoObject[this._acceptsOutOfWorkspaceFilesKey] = value; - } - this._memento.saveMemento(); } }