Bladeren bron

fixed private key selector dialog (fixes #1470)

Eugene Pankov 6 jaren geleden
bovenliggende
commit
acbb9d4ce4
1 gewijzigde bestanden met toevoegingen van 6 en 5 verwijderingen
  1. 6 5
      terminus-ssh/src/components/editConnectionModal.component.ts

+ 6 - 5
terminus-ssh/src/components/editConnectionModal.component.ts

@@ -79,15 +79,16 @@ export class EditConnectionModalComponent {
     }
     }
 
 
     selectPrivateKey () {
     selectPrivateKey () {
-        const path = this.electron.dialog.showOpenDialog(
+        this.electron.dialog.showOpenDialog(
             this.hostApp.getWindow(),
             this.hostApp.getWindow(),
             {
             {
                 title: 'Select private key',
                 title: 'Select private key',
             }
             }
-        )
-        if (path) {
-            this.connection.privateKey = path[0]
-        }
+        ).then(result => {
+            if (!result.filePaths) {
+                this.connection.privateKey = result.filePaths[0]
+            }
+        })
     }
     }
 
 
     save () {
     save () {