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