Skip to content

Commit

Permalink
Fix bug in connect command with Root starting with ~ (fixes #280)
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoofsKelvin committed Aug 5, 2021
1 parent fcbd6d7 commit 803dc59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ export class Manager implements vscode.TaskProvider, vscode.TerminalLinkProvider
if (folder) return vscode.commands.executeCommand('workbench.files.action.refreshFilesExplorer');
let { root = '/' } = config;
if (root.startsWith('~')) {
const con = this.connectionManager.getActiveConnection(config.name, config);
if (con) root = con.home + root.substring(1);
const con = await this.connectionManager.createConnection(config.name, config);
root = con.home + root.substring(1);
}
if (root.startsWith('/')) root = root.substring(1);
vscode.workspace.updateWorkspaceFolders(folders ? folders.length : 0, 0, {
Expand Down

0 comments on commit 803dc59

Please sign in to comment.