Another download fix

This commit is contained in:
exttex
2020-10-02 14:25:56 +02:00
parent 9b4aca64e3
commit 2f8bca3dfb
4 changed files with 8 additions and 45 deletions

View File

@ -291,9 +291,12 @@ class Download {
if (skip) return;
if (this.downloaded != this.size) return;
outFile.close(() => {
this._finished(tmp);
outFile.on('finish', () => {
outFile.close(() => {
this._finished(tmp);
});
});
outFile.end();
});
//Progress
r.on('data', (c) => {