From 11022a426e703a0bedc5eb8f9e50b99a566094b7 Mon Sep 17 00:00:00 2001 From: ProgrammerIn-wonderland <3838shah@gmail.com> Date: Fri, 8 Sep 2023 19:05:41 -0400 Subject: [PATCH] that didn't work as planned so I tried again --- src/oobe/OobeView.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/oobe/OobeView.tsx b/src/oobe/OobeView.tsx index b0d204a1..771c2e1a 100644 --- a/src/oobe/OobeView.tsx +++ b/src/oobe/OobeView.tsx @@ -239,7 +239,7 @@ async function installx86() { // anura.config.rootfs.map((part: string) => fetch(part)), // ); - const files: Response[] = []; + const files: Blob[] = []; let limit = 4; let i = 0; let done = false; @@ -250,7 +250,7 @@ async function installx86() { const assigned = i; i++; fetch(anura.config.rootfs[assigned]) - .then((response) => { + .then(async (response) => { if (response.status != 200) { console.log("Status code bad on chunk " + assigned); console.log(anura.config.rootfs[assigned]); @@ -259,7 +259,7 @@ async function installx86() { ); return; } - files[assigned] = response; + files[assigned] = await response.blob(); limit++; doneSoFar++; @@ -290,10 +290,8 @@ async function installx86() { console.log(files); console.log("constructing blobs..."); - const blobs = await Promise.all(files.map((file) => file.blob())); - console.log(blobs); //@ts-ignore - await anura.x86hdd.loadfile(new Blob(blobs)); + await anura.x86hdd.loadfile(new Blob(files)); } console.log("done");