Skip to content

Commit 66c0d4c

Browse files
committed
fix: opfs booting
1 parent 46ebb83 commit 66c0d4c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Boot.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ window.addEventListener("load", async () => {
111111
milestone = await (await fetch("/MILESTONE")).text();
112112

113113
console.debug("writing config??");
114-
bootStrapFs.writeFile("/config_cached.json", JSON.stringify(conf));
114+
await bootStrapFs.promises.writeFile(
115+
"/config_cached.json",
116+
JSON.stringify(conf),
117+
);
115118
} catch (e) {
116119
conf = JSON.parse(
117120
new TextDecoder().decode(
@@ -125,8 +128,8 @@ window.addEventListener("load", async () => {
125128
anura.settings.cache["bootFromOPFS"] = true;
126129
} else {
127130
anura.settings.cache["bootFromOPFS"] = false;
131+
LocalFS.newOPFS("/opfs"); // mount opfs on boot
128132
}
129-
LocalFS.newOPFS("/opfs"); // mount opfs on boot
130133

131134
if (anura.platform.type === "mobile" || anura.platform.type === "tablet") {
132135
splashToRemove = bootsplashMobile;

0 commit comments

Comments
 (0)