From acbb9d4ce4cdaa09de414d7d8d533b2d09a237f4 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 10 Sep 2019 17:02:03 +0200 Subject: [PATCH] fixed private key selector dialog (fixes #1470) --- .../src/components/editConnectionModal.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/terminus-ssh/src/components/editConnectionModal.component.ts b/terminus-ssh/src/components/editConnectionModal.component.ts index ff250548..42fe8e48 100644 --- a/terminus-ssh/src/components/editConnectionModal.component.ts +++ b/terminus-ssh/src/components/editConnectionModal.component.ts @@ -79,15 +79,16 @@ export class EditConnectionModalComponent { } selectPrivateKey () { - const path = this.electron.dialog.showOpenDialog( + this.electron.dialog.showOpenDialog( this.hostApp.getWindow(), { title: 'Select private key', } - ) - if (path) { - this.connection.privateKey = path[0] - } + ).then(result => { + if (!result.filePaths) { + this.connection.privateKey = result.filePaths[0] + } + }) } save () {