Skip to content

Commit

Permalink
Closing connection shouldn't delete workspace folders if a related fi…
Browse files Browse the repository at this point in the history
…lesystem exists
  • Loading branch information
SchoofsKelvin committed Apr 12, 2021
1 parent 9f988d4 commit cdf0f99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down

0 comments on commit cdf0f99

Please sign in to comment.