(zipMode = false)
| 803 | } |
| 804 | } |
| 805 | function saveCompare_open(zipMode = false) { |
| 806 | const options = { |
| 807 | properties : [(zipMode) ? 'openFile' : 'openDirectory'], |
| 808 | defaultPath : funcLib.prefs.basePath(), |
| 809 | filters : zipMode ? |
| 810 | [{ name : 'ZIP Files', extensions : ['zip'] }] : |
| 811 | null, |
| 812 | } |
| 813 | |
| 814 | dialog.showOpenDialog(serveIPC.windowLib.win.save, options).then((result) => { |
| 815 | if ( !result.canceled ) { saveCompare_read(result.filePaths[0], !zipMode) } |
| 816 | }).catch((err) => { |
| 817 | serveIPC.log.danger('save-check', 'Could not read specified file/folder', err) |
| 818 | }) |
| 819 | } |
| 820 | |
| 821 | // MARK: input bindings |
| 822 | ipcMain.on('dispatch:input', () => { serveIPC.windowLib.createNamedWindow('input') }) |
no test coverage detected