Use os.File.Sync.

pull/820/head
mattn 2013-08-19 11:43:20 +09:00
parent b67b95a296
commit fdec6d5537
1 changed files with 1 additions and 2 deletions

View File

@ -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
}