diff options
author | 2024-11-07 00:16:28 +0000 | |
---|---|---|
committer | 2024-11-07 00:16:28 +0000 | |
commit | 45e1609377631070765065ffb35ed7d29e8e81f1 (patch) | |
tree | 51d170ff0d5fab1ab0f8b1b79c9dd8c31d4ce5b9 /vendor/github.com/ncruces/go-sqlite3/vfs/file.go | |
parent | [chore] update go ffmpreg to v0.6.0 (#3515) (diff) | |
download | gotosocial-45e1609377631070765065ffb35ed7d29e8e81f1.tar.xz |
bump ncruces/go-sqlite3 to v0.20.2 (#3524)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/file.go')
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/vfs/file.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/file.go b/vendor/github.com/ncruces/go-sqlite3/vfs/file.go index ebd42e9ad..ba70aa14f 100644 --- a/vendor/github.com/ncruces/go-sqlite3/vfs/file.go +++ b/vendor/github.com/ncruces/go-sqlite3/vfs/file.go @@ -35,10 +35,10 @@ func testSymlinks(path string) error { func (vfsOS) Delete(path string, syncDir bool) error { err := os.Remove(path) + if errors.Is(err, fs.ErrNotExist) { + return _IOERR_DELETE_NOENT + } if err != nil { - if errors.Is(err, fs.ErrNotExist) { - return _IOERR_DELETE_NOENT - } return err } if runtime.GOOS != "windows" && syncDir { @@ -151,6 +151,7 @@ func (f *vfsFile) Close() error { if f.shm != nil { f.shm.Close() } + f.Unlock(LOCK_NONE) return f.File.Close() } @@ -206,10 +207,10 @@ func (f *vfsFile) HasMoved() (bool, error) { return false, err } pi, err := os.Stat(f.Name()) + if errors.Is(err, fs.ErrNotExist) { + return true, nil + } if err != nil { - if errors.Is(err, fs.ErrNotExist) { - return true, nil - } return false, err } return !os.SameFile(fi, pi), nil |