aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wasm/api/sqlite3-vfs-opfs.c-pp.js')
-rw-r--r--ext/wasm/api/sqlite3-vfs-opfs.c-pp.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
index a2ad6ad3e..fc0fb9db9 100644
--- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
+++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
@@ -390,6 +390,7 @@ const installOpfsVfs = function callee(options){
'SQLITE_ACCESS_EXISTS',
'SQLITE_ACCESS_READWRITE',
'SQLITE_BUSY',
+ 'SQLITE_CANTOPEN',
'SQLITE_ERROR',
'SQLITE_IOERR',
'SQLITE_IOERR_ACCESS',
@@ -718,9 +719,13 @@ const installOpfsVfs = function callee(options){
involve an inherent race condition. For the time being,
pending a better solution, we simply report whether the
given pFile is open.
+
+ Update 2024-06-12: based on forum discussions, this
+ function now always sets pOut to 0 (false):
+
+ https://sqlite.org/forum/forumpost/a2f573b00cda1372
*/
- const f = __openFiles[pFile];
- wasm.poke(pOut, f.lockType ? 1 : 0, 'i32');
+ wasm.poke(pOut, 0, 'i32');
return 0;
},
xClose: function(pFile){
@@ -736,7 +741,6 @@ const installOpfsVfs = function callee(options){
return rc;
},
xDeviceCharacteristics: function(pFile){
- //debug("xDeviceCharacteristics(",pFile,")");
return capi.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN;
},
xFileControl: function(pFile, opId, pArg){