mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
pull in ncruces/go-sqlite3 v0.20.3 with tetratelabs/wazero v1.8.2 (#3574)
This commit is contained in:
3
vendor/github.com/ncruces/go-sqlite3/vfs/os_dotlk.go
generated
vendored
3
vendor/github.com/ncruces/go-sqlite3/vfs/os_dotlk.go
generated
vendored
@ -28,7 +28,8 @@ func osGetSharedLock(file *os.File) _ErrorCode {
|
||||
name := file.Name()
|
||||
locker := vfsDotLocks[name]
|
||||
if locker == nil {
|
||||
err := os.Mkdir(name+".lock", 0777)
|
||||
f, err := os.OpenFile(name+".lock", os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
|
||||
f.Close()
|
||||
if errors.Is(err, fs.ErrExist) {
|
||||
return _BUSY // Another process has the lock.
|
||||
}
|
||||
|
Reference in New Issue
Block a user