🐛 Check for error after zlib uncompression
This commit is contained in:
parent
f40a097b81
commit
523f306ab3
1 changed files with 4 additions and 1 deletions
|
@ -61,8 +61,11 @@ export default async function extractFile(file: ISsnFileEntry, dvArray: DataView
|
|||
}
|
||||
|
||||
//uncompress file
|
||||
const uncompressedBuffer: Buffer = await new Promise((resolve) => {
|
||||
const uncompressedBuffer: Buffer = await new Promise((resolve, reject) => {
|
||||
zlib.inflateRaw(dvFinal, (error, result) => {
|
||||
if (error !== null) {
|
||||
reject(error);
|
||||
}
|
||||
resolve(result);
|
||||
});
|
||||
}) as Buffer;
|
||||
|
|
Loading…
Reference in a new issue