mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Can't sync Windows directories.
This commit is contained in:
3
vfs.go
3
vfs.go
@@ -8,6 +8,7 @@ import (
|
||||
"math/rand"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
@@ -131,7 +132,7 @@ func vfsDelete(ctx context.Context, mod api.Module, pVfs, zPath, syncDir uint32)
|
||||
if err != nil {
|
||||
return uint32(IOERR_DELETE)
|
||||
}
|
||||
if syncDir != 0 {
|
||||
if runtime.GOOS != "windows" && syncDir != 0 {
|
||||
f, err := os.Open(filepath.Dir(path))
|
||||
if err == nil {
|
||||
err = f.Sync()
|
||||
|
||||
Reference in New Issue
Block a user