Skip to content

Commit

Permalink
that didn't work as planned so I tried again
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerIn-wonderland committed Sep 8, 2023
1 parent c4a1031 commit 11022a4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/oobe/OobeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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]);
Expand All @@ -259,7 +259,7 @@ async function installx86() {
);
return;
}
files[assigned] = response;
files[assigned] = await response.blob();
limit++;
doneSoFar++;

Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 11022a4

Please sign in to comment.