return file open error

This commit is contained in:
Chris Lu 2020-12-01 23:36:49 -08:00
parent 45dba088cd
commit dc0bc48257

View file

@ -180,9 +180,15 @@ func (v *Volume) makeupDiff(newDatFileName, newIdxFileName, oldDatFileName, oldI
var indexSize int64
oldIdxFile, err := os.Open(oldIdxFileName)
if err != nil {
return err
}
defer oldIdxFile.Close()
oldDatFile, err := os.Open(oldDatFileName)
if err != nil {
return err
}
oldDatBackend := backend.NewDiskFile(oldDatFile)
defer oldDatBackend.Close()