Skip to content

Commit

Permalink
FIx #8 : No more duplicate window
Browse files Browse the repository at this point in the history
  • Loading branch information
AZn5ReD committed Oct 14, 2020
1 parent 2ace01e commit d98a3e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Pull requests are welcome. For major changes, please open an issue first to disc

## Knwon bugs

- On download click, there is a new window of the GUI appearing. It represents the new child process created which download the file. If it gets closed, the download process will stop. It closes itself at the end of the download.
- All file paths should be absolute path (relative paths don't work).

## Side notes
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ function createDownloadButton(
`);
button.addEventListener("clicked", () => {
button.setEnabled(false);
const child = child_process.fork(
downloader.text(),
const child = child_process.spawn(
"node",
[
downloader.text(),
`--url=${link.text()}`,
`--login=${user.text()}`,
`--password=${password.text()}`,
Expand All @@ -205,6 +206,7 @@ function createDownloadButton(
],
{
stdio: ["pipe", "pipe", "pipe", "ipc"],
windowsHide: true,
}
);

Expand Down

0 comments on commit d98a3e2

Please sign in to comment.