SDA-2443 Fixed incorrect file name in edge cases

This commit is contained in:
psjostrom 2020-09-09 16:15:39 +02:00
parent 3749b2e70c
commit ea43054db3

View File

@ -403,7 +403,7 @@ export const handleDownloadManager = (_event, item: Electron.DownloadItem, webCo
// Send file path when download is complete
item.once('done', (_e, state) => {
if (state === 'completed') {
const savePathSplit = item.getSavePath()?.split('/');
const savePathSplit = item.getSavePath()?.split(path.sep);
const data: IDownloadItem = {
_id: getGuid(),
savedPath: item.getSavePath() || '',