diff options
author | stephan <stephan@noemail.net> | 2024-10-17 12:14:34 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2024-10-17 12:14:34 +0000 |
commit | cab9574668c9d5d8d6da8763860cd95f8d2a787e (patch) | |
tree | 6b15c177e55c4931d22c5bb0d2a6efb09efb2e31 /ext/wasm/api/sqlite3-vfs-opfs.c-pp.js | |
parent | 6031de92c6e06e014323cab81e4c0ac77123fa27 (diff) | |
download | sqlite-cab9574668c9d5d8d6da8763860cd95f8d2a787e.tar.gz sqlite-cab9574668c9d5d8d6da8763860cd95f8d2a787e.zip |
Ensure that the OPFS VFS's xOpen() writes back the read-only flag to the output flags. Resolves the problem reported in [forum:cf37d5ff1182c31081 | forum post cf37d5ff1182c31081].
FossilOrigin-Name: 0a32624015f16fd881a4ecbb56b7833391028d327a95f4c899eee864ed7fe00d
Diffstat (limited to 'ext/wasm/api/sqlite3-vfs-opfs.c-pp.js')
-rw-r--r-- | ext/wasm/api/sqlite3-vfs-opfs.c-pp.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js index 2d11b3583..27f1bfae7 100644 --- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js @@ -922,6 +922,8 @@ const installOpfsVfs = function callee(options){ fh.filename = zName; fh.sab = new SharedArrayBuffer(state.fileBufferSize); fh.flags = flags; + fh.readOnly = !(sqlite3.SQLITE_OPEN_CREATE & flags) + && !!(flags & capi.SQLITE_OPEN_READONLY); const rc = opRun('xOpen', pFile, zName, flags, opfsFlags); if(!rc){ /* Recall that sqlite3_vfs::xClose() will be called, even on |