use path join
This commit is contained in:
parent
930d0b0ad0
commit
e99ef948be
|
@ -89,7 +89,10 @@ function setupTrayItem() {
|
|||
|
||||
function handleDownloads() {
|
||||
mainWindow.webContents.session.on('will-download', (event, item) => {
|
||||
const savePath = app.getPath('downloads') + '/' + item.getFilename();
|
||||
const savePath = path.join(
|
||||
app.getPath('downloads'),
|
||||
item.getFilename()
|
||||
);
|
||||
item.setSavePath(savePath);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue