Fix getPath on MacOS

This commit is contained in:
jely2002
2020-09-03 11:12:21 +02:00
parent cca3fef379
commit a669523669

View File

@@ -15,9 +15,11 @@ if(process.platform === "darwin") {
filePath = defaultBin + "youtube-dl-darwin"
})
} else if(process.platform === "linux") {
defaultBin = await ipcRenderer.invoke('getPath', 'home') + "/.youtube-dl-gui/"
defaultPath = defaultBin + 'details'
filePath = defaultBin + "youtube-dl-darwin"
defaultBin = ipcRenderer.invoke('getPath', 'home').then(() => {
defaultBin += "/.youtube-dl-gui/"
defaultPath = defaultBin + 'details'
filePath = defaultBin + "youtube-dl-darwin"
})
} else {
defaultPath = "resources/details"
filePath = "resources/youtube-dl.exe"