bugfix: close pack files after reading the header

This commit is contained in:
Alexander Neumann 2015-10-27 20:39:52 +01:00
parent 4bc81c2bd2
commit 00e05ae3c9

View file

@ -165,6 +165,9 @@ func (cmd CmdRebuildIndex) RebuildIndex() error {
combinedIndex.Store(blob.Type, blob.ID, packID, blob.Offset, blob.Length)
}
err = rd.Close()
debug.Log("RebuildIndex.RebuildIndex", "error closing reader for pack %v: %v", packID.Str(), err)
if repository.IndexFull(combinedIndex) {
combinedIndex, err = cmd.storeIndex(combinedIndex)
if err != nil {