wal: fix O_RDONLY attr when opening old file

This commit is contained in:
Yicheng Qin 2014-08-02 22:36:53 -07:00
parent 38ec659cd6
commit 969b529b08

View File

@ -57,7 +57,7 @@ func New(path string) (*WAL, error) {
}
func Open(path string) (*WAL, error) {
f, err := os.Open(path)
f, err := os.OpenFile(path, os.O_RDWR, 0)
if err != nil {
return nil, err
}