Compare commits
1 Commits
ede6a3ffcd
...
82a93c4be6
| Author | SHA1 | Date | |
|---|---|---|---|
| 82a93c4be6 |
@ -127,13 +127,13 @@ func (v *Vaultik) Restore(opts *RestoreOptions) error {
|
||||
bar = progressbar.NewOptions64(
|
||||
totalBytesExpected,
|
||||
progressbar.OptionSetDescription("Restoring"),
|
||||
progressbar.OptionSetWriter(os.Stderr),
|
||||
progressbar.OptionSetWriter(v.Stderr),
|
||||
progressbar.OptionShowBytes(true),
|
||||
progressbar.OptionShowCount(),
|
||||
progressbar.OptionSetWidth(40),
|
||||
progressbar.OptionThrottle(100*time.Millisecond),
|
||||
progressbar.OptionOnCompletion(func() {
|
||||
fmt.Fprint(os.Stderr, "\n")
|
||||
v.printfStderr("\n")
|
||||
}),
|
||||
progressbar.OptionSetRenderBlankState(true),
|
||||
)
|
||||
@ -148,7 +148,11 @@ func (v *Vaultik) Restore(opts *RestoreOptions) error {
|
||||
log.Error("Failed to restore file", "path", file.Path, "error", err)
|
||||
result.FilesFailed++
|
||||
result.FailedFiles = append(result.FailedFiles, file.Path.String())
|
||||
// Continue with other files
|
||||
// Update progress bar even on failure
|
||||
if bar != nil {
|
||||
_ = bar.Add64(file.Size)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// Update progress bar
|
||||
|
||||
Loading…
Reference in New Issue
Block a user