Load rxdata async

This commit is contained in:
Varun Patil 2020-05-05 16:00:11 +05:30
parent ebe8d6f3bd
commit ba2e08ec55
3 changed files with 29 additions and 2 deletions

View file

@ -28,8 +28,10 @@ EM_JS(void, load_file_async_js, (const char* fullPathC), {
// Get target URL
const iurl = "gameasync/" + fullPath;
// Delete original file
FS.unlink(path + "/" + filename);
// Delete original file if existent
try {
FS.unlink(path + "/" + filename);
} catch (err) {}
// Get the new file
FS.createPreloadedFile(path, filename, iurl, true, true, function() {