Fix imports

This commit is contained in:
Adria Navarro 2023-06-14 12:30:55 +01:00
parent 450ac715a2
commit 8b6cc9cd98
1 changed files with 11 additions and 1 deletions

View File

@ -125,11 +125,16 @@ export async function decryptFile(
inputFile.pipe(decipher).pipe(unzip).pipe(outputFile)
return new Promise<void>((res, rej) => {
inputFile.on("finish", () => {
outputFile.on("finish", () => {
outputFile.close()
res()
})
inputFile.on("error", e => {
outputFile.close()
rej(e)
})
decipher.on("error", e => {
outputFile.close()
rej(e)
@ -139,6 +144,11 @@ export async function decryptFile(
outputFile.close()
rej(e)
})
outputFile.on("error", e => {
outputFile.close()
rej(e)
})
})
}