Fix checkTotalSizeLimit bug; remove more than 1 file at a time

This commit is contained in:
Jae Kwon 2016-11-21 19:57:17 -08:00
parent a528af55d3
commit dd12bd8f1b
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ func (g *Group) checkTotalSizeLimit() {
log.Println("WARNING: Group's head " + g.Head.Path + "may grow without bound")
return
}
pathToRemove := filePathForIndex(g.Head.Path, gInfo.MinIndex, gInfo.MaxIndex)
pathToRemove := filePathForIndex(g.Head.Path, index, gInfo.MaxIndex)
fileInfo, err := os.Stat(pathToRemove)
if err != nil {
log.Println("WARNING: Failed to fetch info for file @" + pathToRemove)