summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/vfs/filename.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-08-15 00:30:58 +0000
committerLibravatar GitHub <noreply@github.com>2024-08-15 00:30:58 +0000
commit586639ccf0e2fefbd1da2c59d5abcb8d64d37434 (patch)
tree52a9d7412e98ef406c39f09a6fad6e3fa7a7ad49 /vendor/github.com/ncruces/go-sqlite3/vfs/filename.go
parentupdate go-ffmpreg to v0.2.5 (pulls in latest tetratelabs/wazero) (#3203) (diff)
downloadgotosocial-586639ccf0e2fefbd1da2c59d5abcb8d64d37434.tar.xz
update go-sqlite3 to v0.18.0 (#3204)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/filename.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/vfs/filename.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/filename.go b/vendor/github.com/ncruces/go-sqlite3/vfs/filename.go
index e23575bbb..51d0b8dda 100644
--- a/vendor/github.com/ncruces/go-sqlite3/vfs/filename.go
+++ b/vendor/github.com/ncruces/go-sqlite3/vfs/filename.go
@@ -20,8 +20,8 @@ type Filename struct {
stack [2]uint64
}
-// OpenFilename is an internal API users should not call directly.
-func OpenFilename(ctx context.Context, mod api.Module, id uint32, flags OpenFlag) *Filename {
+// GetFilename is an internal API users should not call directly.
+func GetFilename(ctx context.Context, mod api.Module, id uint32, flags OpenFlag) *Filename {
if id == 0 {
return nil
}
@@ -66,6 +66,10 @@ func (n *Filename) path(method string) string {
if n == nil || n.zPath == 0 {
return ""
}
+ if n.flags&(OPEN_MAIN_DB|OPEN_MAIN_JOURNAL|OPEN_WAL) == 0 {
+ return ""
+ }
+
n.stack[0] = uint64(n.zPath)
fn := n.mod.ExportedFunction(method)
if err := fn.CallWithStack(n.ctx, n.stack[:]); err != nil {