From 49d58c69bcfe6ba7a05836fe758ad644765685c0 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 28 Aug 2021 17:07:23 +0200 Subject: [PATCH] sftp: handle incorrect reported CWD --- tabby-ssh/src/components/sftpPanel.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tabby-ssh/src/components/sftpPanel.component.ts b/tabby-ssh/src/components/sftpPanel.component.ts index 3118d733..7d0ec225 100644 --- a/tabby-ssh/src/components/sftpPanel.component.ts +++ b/tabby-ssh/src/components/sftpPanel.component.ts @@ -34,7 +34,12 @@ export class SFTPPanelComponent { async ngOnInit (): Promise { this.sftp = await this.session.openSFTP() - await this.navigate(this.path) + try { + await this.navigate(this.path) + } catch (error) { + console.warn('Could not navigate to', this.path, ':', error) + await this.navigate('/') + } } async navigate (newPath: string): Promise {