New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various Emscripten frontend fixes #199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact I'll have to re-implement some of these bothers me a little, especially for the storage part, as that code is shared between Zeta (for which I strongly care about having total authorship control) and MegaZeux (where that is not the case). It's not a big concern though so don't worry about it. I haven't gotten around to it mostly as I've been feeling a bit off during the past week, and thesis-related stress on top too.
Providing my buggy partial implementation of rename here for reference. This causes crashes after renaming a file too many times and I haven't even bothered to see what directory rename does (it probably just crashes,
|
This fixes various issues with the Emscripten port's frontend blocking the release of HTML5 builds.
O_TRUNC
(tested with memory, localStorage, and IndexedDB). Overwriting save files with a new save file would fail to wipe the data after the end of the file, causing MZX to detect a corrupt ZIP.false
, so some checks would fail to detect the existence of the empty file when retrieving it later. This seems to have been a problem even before this branch but theO_TRUNC
fix made it worse.unlink
. It seems to work fine but could be tested more.rmdir
. Same as above.Would be nice, but probably won't bother with:
rename
. For now it just prints a console error instead of crashing MZX. Prevented by FS API nightmare codemknod
which intentionally fails for directories currently. ThecreateNode
function also ignores the incoming mode and errors when creating a directory. It'd be nice to create directories even if they aren't stored, but I'm not sure it's worth the effort and potentially breaking something right now.