Fix an error in addCachePathsForSectorSize func

This commit is contained in:
chunqizhi 2020-07-06 17:49:05 +08:00
parent 837aba777f
commit 7b9ab5e292

View File

@ -98,11 +98,13 @@ func addCachePathsForSectorSize(chk map[string]int64, cacheDir string, ssize abi
case 512 << 20:
chk[filepath.Join(cacheDir, "sc-02-data-tree-r-last.dat")] = 0
case 32 << 30:
fallthrough
case 64 << 30:
for i := 0; i < 8; i++ {
chk[filepath.Join(cacheDir, fmt.Sprintf("sc-02-data-tree-r-last-%d.dat", i))] = 0
}
case 64 << 30:
for i := 0; i < 16; i++ {
chk[filepath.Join(cacheDir, fmt.Sprintf("sc-02-data-tree-r-last-%d.dat", i))] = 0
}
default:
log.Warnf("not checking cache files of %s sectors for faults", ssize)
}