mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix array input + use getFolder()
This commit is contained in:
@ -67,11 +67,11 @@ module.exports = (win, options, refreshMenu) => [
|
|||||||
click: () => {
|
click: () => {
|
||||||
let result = dialog.showOpenDialogSync({
|
let result = dialog.showOpenDialogSync({
|
||||||
properties: ['openDirectory', 'createDirectory'],
|
properties: ['openDirectory', 'createDirectory'],
|
||||||
defaultPath: Array.isArray(options.downloadFolder) ? options.downloadFolder[0] : undefined,
|
defaultPath: getFolder(options.downloadFolder),
|
||||||
})
|
})
|
||||||
if(result) {
|
if(result) {
|
||||||
options.downloadFolder = result
|
options.downloadFolder = result[0];
|
||||||
setOptions("downloader", options)
|
setOptions("downloader", options);
|
||||||
} //else = user pressed cancel
|
} //else = user pressed cancel
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user