summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/r2/r2modman/wrapper-fix.patch
blob: bf2681f673c46d8e9073fb6a2050b635edfb0b61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/pages/Splash.vue b/src/pages/Splash.vue
index a3d16f16..36d77fb1 100644
--- a/src/pages/Splash.vue
+++ b/src/pages/Splash.vue
@@ -188,8 +188,8 @@ async function ensureWrapperInGameFolder(wrapperName: WrapperScript) {
         if (await FsProvider.instance.exists(path.join(PathResolver.MOD_ROOT, wrapperName))) {
             await FsProvider.instance.unlink(path.join(PathResolver.MOD_ROOT, wrapperName));
         }
-        const wrapperFileResult = await fetch(ProtocolProvider.getPublicAssetUrl(`/${wrapperName}`)).then(res => res.arrayBuffer());
-        const wrapperFileContent = Buffer.from(wrapperFileResult);
+        const wrapperFilePath = path.join(staticsDirectory, wrapperName);
+        const wrapperFileContent = await FsProvider.instance.readFile(wrapperFilePath);
         await FsProvider.instance.writeFile(path.join(PathResolver.MOD_ROOT, wrapperName), wrapperFileContent);
         await FsProvider.instance.writeFile(path.join(PathResolver.MOD_ROOT, wrapperName), wrapperFileContent);
     }