Merge pull request #1069 from psjostrom/SDA-2443-Fix-incorrect-download-file-name

fix: SDA-2443 Fixed incorrect file name in edge cases
This commit is contained in:
psjostrom 2020-09-14 10:59:10 +02:00 committed by GitHub
commit 0a010c8c92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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() || '',