Handle canceled folder selection
This commit is contained in:
@@ -247,6 +247,9 @@ ipcMain.on('browseFolder', (event, args) => {
|
||||
properties:["openDirectory"]}
|
||||
).then(result => {
|
||||
console.log(result)
|
||||
if (result.canceled || result.filePaths.length === 0) {
|
||||
return;
|
||||
}
|
||||
setImmediate(function() {
|
||||
var focusedWindow = BrowserWindow.getFocusedWindow();
|
||||
focusedWindow.webContents.send('browseFolder',result.filePaths);
|
||||
|
||||
Reference in New Issue
Block a user