From 54a166a360c86e6f521d50007f7e661329e58304 Mon Sep 17 00:00:00 2001 From: Brad Date: Sun, 14 Feb 2021 19:47:01 -0600 Subject: [PATCH] Allows hosting in a subfolder instead of only root Paths starting with slashes look in the root of a site, and these asset folders should generally be beside this .js + index.html... This simple change was all that was needed to allow hosting in a subfolder of a site, and is not a breaking change unless someone has the asset folders elsewhere, which would be a breaking change on their part anyway. --- pkg/emscripten/libretro/libretro.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/emscripten/libretro/libretro.js b/pkg/emscripten/libretro/libretro.js index bfe44c561e..9d41bfa4c8 100644 --- a/pkg/emscripten/libretro/libretro.js +++ b/pkg/emscripten/libretro/libretro.js @@ -96,10 +96,10 @@ function setupFileSystem(backend) /* create an XmlHttpRequest filesystem for the bundled data */ var xfs1 = new BrowserFS.FileSystem.XmlHttpRequest - (".index-xhr", "/assets/frontend/bundle/"); + (".index-xhr", "assets/frontend/bundle/"); /* create an XmlHttpRequest filesystem for core assets */ var xfs2 = new BrowserFS.FileSystem.XmlHttpRequest - (".index-xhr", "/assets/cores/"); + (".index-xhr", "assets/cores/"); console.log("WEBPLAYER: initializing filesystem: " + backend); mfs.mount('/home/web_user/retroarch/userdata', afs);