From 0c8bc4d73220f8ab2aa1b5d5b5622ca4eee3c61f Mon Sep 17 00:00:00 2001 From: C-3PO Date: Thu, 5 Jul 2018 23:00:10 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Wait=20for=20local=20file=20head?= =?UTF-8?q?er=20reading=20to=20be=20complete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ssn/getManifest.ts | 2 +- src/ssn/getSolidpkg.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssn/getManifest.ts b/src/ssn/getManifest.ts index 8bd5859..0e81153 100644 --- a/src/ssn/getManifest.ts +++ b/src/ssn/getManifest.ts @@ -36,7 +36,7 @@ export default async function getManifest(product: Product): Promise const stream = arrayBufferToStream(ssnFile, firstFile.offset); //Extract manifest.xml file - readLocalFileHeader(stream); + await readLocalFileHeader(stream); const patchmanifestStream = extractFileStream(firstFile, stream); //Convert ArrayBuffer to string diff --git a/src/ssn/getSolidpkg.ts b/src/ssn/getSolidpkg.ts index c266133..ed6f512 100644 --- a/src/ssn/getSolidpkg.ts +++ b/src/ssn/getSolidpkg.ts @@ -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;