diff options
author | Alexander Neumann <alexander@bumpern.de> | 2015-10-27 20:39:52 +0100 |
---|---|---|
committer | Alexander Neumann <alexander@bumpern.de> | 2015-10-27 20:39:52 +0100 |
commit | 00e05ae3c902836ce1151f4a2b45241ecb4ea120 (patch) | |
tree | 084c4e20deb8d571c0feb6ee183c6bf5f8060c42 /cmd | |
parent | 4bc81c2bd29d1c4cf54d39b877ed0ddec85d980a (diff) |
bugfix: close pack files after reading the header
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/restic/cmd_rebuild_index.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/restic/cmd_rebuild_index.go b/cmd/restic/cmd_rebuild_index.go index bcce5d61f..3582079b1 100644 --- a/cmd/restic/cmd_rebuild_index.go +++ b/cmd/restic/cmd_rebuild_index.go @@ -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 { |