diff --git a/base/sources/backends/data/wasm/start.js b/base/sources/backends/data/wasm/start.js index 7f0f9bb0..d5df49c7 100644 --- a/base/sources/backends/data/wasm/start.js +++ b/base/sources/backends/data/wasm/start.js @@ -630,6 +630,9 @@ async function init() { req.open("GET", read_string(filename), false); req.overrideMimeType("text/plain; charset=x-user-defined"); req.send(); + if (req.status === 0 || req.status >= 400) { + return 0; + } str = req.response; } file_buffer_pos = 0; diff --git a/base/sources/backends/wasm_system.c b/base/sources/backends/wasm_system.c index 19ed3938..0a602c3b 100644 --- a/base/sources/backends/wasm_system.c +++ b/base/sources/backends/wasm_system.c @@ -232,6 +232,10 @@ const char *iron_system_id() { return "Wasm"; } +const char *iron_internal_save_path() { + return "."; +} + // char *iron_internal_cut_callback(void); // char *iron_internal_copy_callback(void); // void iron_internal_paste_callback(char *); diff --git a/base/tools/make.js b/base/tools/make.js index 5f2612dc..e27d2775 100644 --- a/base/tools/make.js +++ b/base/tools/make.js @@ -2648,7 +2648,7 @@ class IronExporter { copy_blob(from, to, embed) { fs_ensuredir(path_join("build", "out", path_dirname(to))); let to_full = path_join("build", "out", to); - if (embed && !to.endsWith(".txt") && !to.endsWith(".md") && !to.endsWith(".json") && !to.endsWith(".js")) { + if (embed && !to.endsWith(".txt") && !to.endsWith(".md") && !to.endsWith(".json") && !to.endsWith(".js") && !to.endsWith(".html")) { fs_ensuredir(path_join("build", "temp", path_dirname(to))); to_full = path_join("build", "temp", to); } @@ -2694,7 +2694,7 @@ function export_iron_project(project, options) { if (globalThis.flags.embed) { let embed_files = []; for (let asset of assets) { - if (asset.noembed || asset.from.endsWith(".txt") || asset.from.endsWith(".md") || asset.from.endsWith(".json") || asset.from.endsWith(".js")) { + if (asset.noembed || asset.from.endsWith(".txt") || asset.from.endsWith(".md") || asset.from.endsWith(".json") || asset.from.endsWith(".js") || asset.from.endsWith(".html")) { continue; } embed_files.push(path_resolve("build", "temp", asset.files[0]));