mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Write bios/patch/parent files to the same folder as the start filename
This commit is contained in:
parent
3fbc803c36
commit
a8dc84b1eb
@ -682,12 +682,14 @@ class EmulatorJS {
|
||||
const gotData = async (input) => {
|
||||
const data = await this.checkCompression(new Uint8Array(input), decompressProgressMessage);
|
||||
for (const k in data) {
|
||||
const coreFilename = "/"+this.fileName;
|
||||
const coreFilePath = coreFilename.substring(0, coreFilename.length - coreFilename.split("/").pop().length);
|
||||
if (k === "!!notCompressedData") {
|
||||
this.gameManager.FS.writeFile(assetUrl.split('/').pop().split("#")[0].split("?")[0], data[k]);
|
||||
this.gameManager.FS.writeFile(coreFilePath + assetUrl.split('/').pop().split("#")[0].split("?")[0], data[k]);
|
||||
break;
|
||||
}
|
||||
if (k.endsWith('/')) continue;
|
||||
this.gameManager.FS.writeFile("/" + k.split('/').pop(), data[k]);
|
||||
this.gameManager.FS.writeFile(coreFilePath + k.split('/').pop(), data[k]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user