add error checking when loading dat file

This commit is contained in:
Chris Lu 2018-07-09 23:31:25 -07:00
parent 6c4fee85e3
commit 8a12fd9ec4

View File

@ -43,6 +43,8 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
if e != nil {
if !os.IsPermission(e) {
return fmt.Errorf("cannot load Volume Data %s.dat: %v", fileName, e)
} else {
return fmt.Errorf("load data file %s.dat: %v", fileName, e)
}
}