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.
This commit is contained in:
Brad 2021-02-14 19:47:01 -06:00 committed by GitHub
parent 518b043ae2
commit 54a166a360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);