2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-16 01:57:10 +00:00

On prune report, packs instead of files + fix counter

This commit is contained in:
Lluís Batlle i Rossell 2016-08-27 20:04:35 +02:00
parent 12a904eb4b
commit 3acf03986a

View File

@ -100,7 +100,7 @@ func (cmd CmdPrune) Execute(args []string) error {
cmd.global.Verbosef("building new index for repo\n") cmd.global.Verbosef("building new index for repo\n")
bar := newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "files") bar := newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "packs")
idx, err := index.New(repo, bar) idx, err := index.New(repo, bar)
if err != nil { if err != nil {
return err return err
@ -213,10 +213,11 @@ nextPack:
cmd.global.Verbosef("creating new index\n") cmd.global.Verbosef("creating new index\n")
stats.packs = 0
for _ = range repo.List(backend.Data, done) { for _ = range repo.List(backend.Data, done) {
stats.packs++ stats.packs++
} }
bar = newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "files") bar = newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "packs")
idx, err = index.New(repo, bar) idx, err = index.New(repo, bar)
if err != nil { if err != nil {
return err return err