Skip to content
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

IDBMirrorVFS.jTruncate() doesn't open a transaction #233

Open
rhashimoto opened this issue Dec 21, 2024 · 0 comments
Open

IDBMirrorVFS.jTruncate() doesn't open a transaction #233

rhashimoto opened this issue Dec 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rhashimoto
Copy link
Owner

rhashimoto commented Dec 21, 2024

As reported here by @subframe7536, a direct call to IDBMirrorVFS.jTruncate() without a preceding call to jWrite() fails because there is no active transaction. This isn't expected to be encountered when the VFS is called from SQLite because the updated page count will be written to page 0, but the file demo does make a call this way.

The proposed fix is to create an active transaction in jTruncate() as well as jWrite().

This bug is also present in OPFSPermutedVFS.

@rhashimoto rhashimoto added the bug Something isn't working label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant