diff options
Diffstat (limited to 'ext/wasm/api/sqlite3-api-worker1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-worker1.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/wasm/api/sqlite3-api-worker1.js b/ext/wasm/api/sqlite3-api-worker1.js index 00359413b..97f2677e6 100644 --- a/ext/wasm/api/sqlite3-api-worker1.js +++ b/ext/wasm/api/sqlite3-api-worker1.js @@ -371,10 +371,14 @@ sqlite3.initWorker1API = function(){ close: function(db,alsoUnlink){ if(db){ delete this.dbs[getDbId(db)]; - const filename = db.fileName(); + const filename = db.getFilename(); db.close(); if(db===this.defaultDb) this.defaultDb = undefined; if(alsoUnlink && filename){ + /* This isn't necessarily correct: the db might be using a + VFS other than the default. How do we best resolve this + without having to special-case the kvvfs and opfs + VFSes? */ sqlite3.capi.wasm.sqlite3_wasm_vfs_unlink(filename); } } |