Browse Source

fix another return value bug

pull/2698/head
guosj 3 years ago
parent
commit
d68c27f82d
  1. 6
      weed/storage/volume_vacuum.go

6
weed/storage/volume_vacuum.go

@ -399,7 +399,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
dataFile *os.File dataFile *os.File
) )
if dstDatBackend, err = backend.CreateVolumeFile(dstDatName, preallocate, 0); err != nil { if dstDatBackend, err = backend.CreateVolumeFile(dstDatName, preallocate, 0); err != nil {
return
return err
} }
defer dstDatBackend.Close() defer dstDatBackend.Close()
@ -408,7 +408,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
newNm := needle_map.NewMemDb() newNm := needle_map.NewMemDb()
defer newNm.Close() defer newNm.Close()
if err = oldNm.LoadFromIdx(srcIdxName); err != nil { if err = oldNm.LoadFromIdx(srcIdxName); err != nil {
return
return err
} }
if dataFile, err = os.Open(srcDatName); err != nil { if dataFile, err = os.Open(srcDatName); err != nil {
return err return err
@ -464,5 +464,5 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
newNm.SaveToIdx(datIdxName) newNm.SaveToIdx(datIdxName)
return
return nil
} }
Loading…
Cancel
Save