mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix another return value bug
This commit is contained in:
parent
8f9aa0cddd
commit
d68c27f82d
|
@ -399,7 +399,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
|
|||
dataFile *os.File
|
||||
)
|
||||
if dstDatBackend, err = backend.CreateVolumeFile(dstDatName, preallocate, 0); err != nil {
|
||||
return
|
||||
return err
|
||||
}
|
||||
defer dstDatBackend.Close()
|
||||
|
||||
|
@ -408,7 +408,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
|
|||
newNm := needle_map.NewMemDb()
|
||||
defer newNm.Close()
|
||||
if err = oldNm.LoadFromIdx(srcIdxName); err != nil {
|
||||
return
|
||||
return err
|
||||
}
|
||||
if dataFile, err = os.Open(srcDatName); err != nil {
|
||||
return err
|
||||
|
@ -464,5 +464,5 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
|
|||
|
||||
newNm.SaveToIdx(datIdxName)
|
||||
|
||||
return
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue