use path join

This commit is contained in:
Abhinav 2022-08-08 15:13:49 +05:30
parent 930d0b0ad0
commit e99ef948be

View file

@ -89,7 +89,10 @@ function setupTrayItem() {
function handleDownloads() { function handleDownloads() {
mainWindow.webContents.session.on('will-download', (event, item) => { 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); item.setSavePath(savePath);
}); });
} }