forked from TrueCloudLab/restic
Remvoe automatic index conversion
This commit is contained in:
parent
43e2c9837e
commit
0222b1701e
1 changed files with 2 additions and 9 deletions
|
@ -3,7 +3,6 @@ package checker
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/restic/restic"
|
"github.com/restic/restic"
|
||||||
|
@ -73,14 +72,8 @@ func (c *Checker) LoadIndex() (hints []error, errs []error) {
|
||||||
debug.Log("LoadIndex", "worker got index %v", id)
|
debug.Log("LoadIndex", "worker got index %v", id)
|
||||||
idx, err := repository.LoadIndexWithDecoder(c.repo, id.String(), repository.DecodeIndex)
|
idx, err := repository.LoadIndexWithDecoder(c.repo, id.String(), repository.DecodeIndex)
|
||||||
if err == repository.ErrOldIndexFormat {
|
if err == repository.ErrOldIndexFormat {
|
||||||
debug.Log("LoadIndex", "old index format found, converting")
|
debug.Log("LoadIndex", "index %v has old format", id.Str())
|
||||||
fmt.Fprintf(os.Stderr, "convert index %v to new format\n", id.Str())
|
idx, err = repository.LoadIndexWithDecoder(c.repo, id.String(), repository.DecodeOldIndex)
|
||||||
id, err = repository.ConvertIndex(c.repo, id)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
idx, err = repository.LoadIndexWithDecoder(c.repo, id.String(), repository.DecodeIndex)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue