mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-12 19:22:28 +00:00
fix: passing complete download path to setSavePath
This commit is contained in:
parent
19b1d29713
commit
4d60317475
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import { DownloadItem } from "electron";
|
||||
import { WindowManager } from "../window-manager";
|
||||
import path from "node:path";
|
||||
|
||||
export class HTTPDownload {
|
||||
private static id = 0;
|
||||
|
@ -56,7 +57,7 @@ export class HTTPDownload {
|
|||
this.downloads[gid.toString()] = item;
|
||||
|
||||
// Set the save path, making Electron not to prompt a save dialog.
|
||||
item.setSavePath(downloadPath);
|
||||
item.setSavePath(path.join(downloadPath, item.getFilename()));
|
||||
|
||||
resolve(gid.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue