From f121c118a310e797f4e4155ef55365a4dad673bb Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Sun, 27 Oct 2019 22:03:28 +0300 Subject: [PATCH] fix(download): fix download to directory after update --- src/app/download-torrent-menu.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/download-torrent-menu.js b/src/app/download-torrent-menu.js index a621a12..25ad4e3 100644 --- a/src/app/download-torrent-menu.js +++ b/src/app/download-torrent-menu.js @@ -40,14 +40,15 @@ export default (props) => { }, - {name: __('Download to') + '...', click: () => { + {name: __('Download to') + '...', click: async () => { if(dialog) { - const path = dialog.showOpenDialog({ + const path = (await dialog.showOpenDialog({ properties: ['openDirectory'] - }); + })).filePaths; if(!path || path.length < 1) return + console.log(path); window.torrentSocket.emit('download', props.torrent, path[0], (added) => { if(props.onAdded) props.onAdded(added)