mirror of
https://github.com/restic/restic.git
synced 2026-06-22 16:44:17 +00:00
repository: Use backend.ID to load index
This commit uses ParallelWorkFuncParseID() to load all indexes and ignores file names with invalid format. This fixes #475.
This commit is contained in:
@@ -105,7 +105,7 @@ func (cmd CmdDump) DumpIndexes() error {
|
||||
for id := range cmd.repo.List(backend.Index, done) {
|
||||
fmt.Printf("index_id: %v\n", id)
|
||||
|
||||
idx, err := repository.LoadIndex(cmd.repo, id.String())
|
||||
idx, err := repository.LoadIndex(cmd.repo, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (cmd CmdRebuildIndex) RebuildIndex() error {
|
||||
cmd.global.Printf(" loading index %v\n", i)
|
||||
|
||||
debug.Log("RebuildIndex.RebuildIndex", "load index %v", indexID.Str())
|
||||
idx, err := repository.LoadIndex(cmd.repo, indexID.String())
|
||||
idx, err := repository.LoadIndex(cmd.repo, indexID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user