mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
only cares about error other than EOF
This commit is contained in:
parent
91492b4947
commit
a4cef2fbd4
|
@ -3,6 +3,7 @@ package storage
|
|||
import (
|
||||
"code.google.com/p/weed-fs/go/util"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
@ -60,7 +61,10 @@ func LoadNeedleMap(file *os.File) (*NeedleMap, error) {
|
|||
|
||||
count, e = nm.indexFile.Read(bytes)
|
||||
}
|
||||
return nm, nil
|
||||
if e == io.EOF {
|
||||
e = nil
|
||||
}
|
||||
return nm, e
|
||||
}
|
||||
|
||||
func (nm *NeedleMap) Put(key uint64, offset uint32, size uint32) (int, error) {
|
||||
|
|
Loading…
Reference in a new issue