mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 08:43:48 +03:00
fix: passing complete download path to setSavePath
This commit is contained in:
parent
19b1d29713
commit
4d60317475
@ -1,5 +1,6 @@
|
|||||||
import { DownloadItem } from "electron";
|
import { DownloadItem } from "electron";
|
||||||
import { WindowManager } from "../window-manager";
|
import { WindowManager } from "../window-manager";
|
||||||
|
import path from "node:path";
|
||||||
|
|
||||||
export class HTTPDownload {
|
export class HTTPDownload {
|
||||||
private static id = 0;
|
private static id = 0;
|
||||||
@ -56,7 +57,7 @@ export class HTTPDownload {
|
|||||||
this.downloads[gid.toString()] = item;
|
this.downloads[gid.toString()] = item;
|
||||||
|
|
||||||
// Set the save path, making Electron not to prompt a save dialog.
|
// 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());
|
resolve(gid.toString());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user