From fdec6d55372d6d810be7dd999c72646152f0fe5f Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 19 Aug 2013 11:43:20 +0900 Subject: [PATCH] Use os.File.Sync. --- snapshot.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snapshot.go b/snapshot.go index d35474f8a4..6ed5087a74 100644 --- a/snapshot.go +++ b/snapshot.go @@ -6,7 +6,6 @@ import ( "fmt" "hash/crc32" "os" - "syscall" ) //------------------------------------------------------------------------------ @@ -54,7 +53,7 @@ func (ss *Snapshot) save() error { } // force the change writting to disk - syscall.Fsync(int(file.Fd())) + file.Sync() return err }