From cdf0f997e133be08ffc33b21af16c83afe28ffe5 Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Mon, 12 Apr 2021 22:17:55 +0200 Subject: [PATCH] Closing connection shouldn't delete workspace folders if a related filesystem exists --- src/manager.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/manager.ts b/src/manager.ts index 81440cc..ecf42c0 100644 --- a/src/manager.ts +++ b/src/manager.ts @@ -269,6 +269,9 @@ export class Manager implements vscode.TaskProvider, vscode.TerminalLinkProvider .filter(con => con.actualConfig.name === target); } for (const con of cons) this.connectionManager.closeConnection(con); + const others = this.connectionManager.getActiveConnections().filter(c => c.actualConfig.name === target); + if (others && others.some(c => c.filesystems.length)) return; + // No other filesystems of the same name left anymore, so remove all related workspace folders const folders = vscode.workspace.workspaceFolders || []; let start: number = folders.length; let left: vscode.WorkspaceFolder[] = [];