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-opfs-async-proxy.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-opfs-async-proxy.js')
-rw-r--r-- | ext/wasm/api/sqlite3-opfs-async-proxy.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/wasm/api/sqlite3-opfs-async-proxy.js b/ext/wasm/api/sqlite3-opfs-async-proxy.js index ca5583971..0028c1025 100644 --- a/ext/wasm/api/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/api/sqlite3-opfs-async-proxy.js @@ -506,8 +506,7 @@ const installAsyncProxy = function(){ dirHandle: hDir, fileHandle: hFile, sabView: state.sabFileBufView, - readOnly: create - ? false : (state.sq3Codes.SQLITE_OPEN_READONLY & flags), + readOnly: !create && !!(state.sq3Codes.SQLITE_OPEN_READONLY & flags), deleteOnClose: !!(state.sq3Codes.SQLITE_OPEN_DELETEONCLOSE & flags) }); fh.releaseImplicitLocks = |