diff options
Diffstat (limited to 'src/electron')
-rw-r--r-- | src/electron/ipc-api/download.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/electron/ipc-api/download.ts b/src/electron/ipc-api/download.ts index d749cb889..a306ba68d 100644 --- a/src/electron/ipc-api/download.ts +++ b/src/electron/ipc-api/download.ts | |||
@@ -52,4 +52,14 @@ export default (params: { mainWindow: BrowserWindow }) => { | |||
52 | } | 52 | } |
53 | }, | 53 | }, |
54 | ); | 54 | ); |
55 | |||
56 | ipcMain.handle('download-folder-select', async () => { | ||
57 | const result = await dialog.showOpenDialog(params.mainWindow, { | ||
58 | properties: ['openDirectory'], | ||
59 | }); | ||
60 | |||
61 | if (result.canceled) return null; | ||
62 | |||
63 | return result.filePaths[0]; | ||
64 | }); | ||
55 | }; | 65 | }; |