mirror of
https://github.com/restic/restic.git
synced 2026-12-03 07:40:47 +00:00
Add command rebuild-index
This commit is contained in:
1 parent
9074c923ea
commit
6aed9f268b
3 files changed
+153
No files matched your search
@@ -52,8 +52,16 @@ func (cmd CmdCheck) Execute(args []string) error {
|
||||
cmd.global.Verbosef("Load indexes\n")
|
||||
hints, errs := chkr.LoadIndex()
|
||||
|
||||
dupFound := false
|
||||
for _, hint := range hints {
|
||||
cmd.global.Printf("%v\n", hint)
|
||||
if _, ok := hint.(checker.ErrDuplicatePacks); ok {
|
||||
dupFound = true
|
||||
}
|
||||
}
|
||||
|
||||
if dupFound {
|
||||
cmd.global.Printf("\nrun `restic rebuild-index' to correct this\n")
|
||||
}
|
||||
|
||||
if len(errs) > 0 {
|
||||
|
||||
Reference in new issue
Block a user