fix needle map entry size

This commit is contained in:
Chris Lu
2019-04-19 00:39:34 -07:00
parent e5506152c0
commit ac2727853f
18 changed files with 195 additions and 184 deletions

View File

@@ -103,7 +103,9 @@ func runBackup(cmd *Command, args []string) bool {
v.DataFile().WriteAt(v.SuperBlock.Bytes(), 0)
}
if uint64(v.Size()) > stats.TailOffset {
datSize, _, _ := v.FileStat()
if datSize > stats.TailOffset {
// remove the old data
v.Destroy()
// recreate an empty volume