summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-04-04 15:34:38 +0000
committerLibravatar GitHub <noreply@github.com>2025-04-04 17:34:38 +0200
commitdb4b85715966ee590c6cdff5cc52e592b66e3d17 (patch)
tree83642d3afe51fbe279e36a9a6c9069f785a0adeb /vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go
parent[bugfix] Fix Atkinson Hyperlegible font embedding on Ecks Pee theme. (#3964) (diff)
downloadgotosocial-db4b85715966ee590c6cdff5cc52e592b66e3d17.tar.xz
[chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go b/vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go
index 9f42b5f6c..ec312ccd3 100644
--- a/vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go
+++ b/vendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go
@@ -10,8 +10,8 @@ import (
)
const (
+ isUnix = true
_O_NOFOLLOW = unix.O_NOFOLLOW
- canSyncDirs = true
)
func osAccess(path string, flags AccessFlag) error {
@@ -65,10 +65,15 @@ func osTestLock(file *os.File, start, len int64) (int16, _ErrorCode) {
Start: start,
Len: len,
}
- if unix.FcntlFlock(file.Fd(), unix.F_GETLK, &lock) != nil {
- return 0, _IOERR_CHECKRESERVEDLOCK
+ for {
+ err := unix.FcntlFlock(file.Fd(), unix.F_GETLK, &lock)
+ if err == nil {
+ return lock.Type, _OK
+ }
+ if err != unix.EINTR {
+ return 0, _IOERR_CHECKRESERVEDLOCK
+ }
}
- return lock.Type, _OK
}
func osLockErrorCode(err error, def _ErrorCode) _ErrorCode {