🚑 Wait for local file header reading to be complete
This commit is contained in:
parent
07de050588
commit
0c8bc4d732
2 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ export default async function getManifest(product: Product): Promise<IManifest>
|
|||
const stream = arrayBufferToStream(ssnFile, firstFile.offset);
|
||||
|
||||
//Extract manifest.xml file
|
||||
readLocalFileHeader(stream);
|
||||
await readLocalFileHeader(stream);
|
||||
const patchmanifestStream = extractFileStream(firstFile, stream);
|
||||
|
||||
//Convert ArrayBuffer to string
|
||||
|
|
|
@ -41,7 +41,7 @@ export default async function getSolidpkg(product: Product, from: number, to: nu
|
|||
const stream = arrayBufferToStream(ssnFile, firstFile.offset);
|
||||
|
||||
//Extract metafile.solid file
|
||||
readLocalFileHeader(stream);
|
||||
await readLocalFileHeader(stream);
|
||||
const solidFileStream = extractFileStream(firstFile, stream);
|
||||
const solidFileArrayBuffer = await streamToArrayBuffer(solidFileStream);
|
||||
const solidContents = parseBencode(new DataView(solidFileArrayBuffer)) as ISolid;
|
||||
|
|
Loading…
Reference in a new issue