mirror of
https://github.com/restic/restic.git
synced 2026-10-14 05:57:12 +00:00
stat: Improve error message for bad snapshot ID (fixes #1933)
This commit is contained in:
1 parent
beb208e159
commit
6f5b0f3622
2 files changed
+3
-3
No files matched your search
@@ -100,13 +100,13 @@ func runStats(gopts GlobalOptions, args []string) error {
|
||||
} else {
|
||||
sID, err = restic.FindSnapshot(repo, snapshotIDString)
|
||||
if err != nil {
|
||||
return err
|
||||
Exitf(1, "error loading snapshot: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
snapshot, err := restic.LoadSnapshot(ctx, repo, sID)
|
||||
if err != nil {
|
||||
return err
|
||||
Exitf(1, "error loading snapshot from repo: %v", err)
|
||||
}
|
||||
|
||||
err = statsWalkSnapshot(ctx, snapshot, repo, stats)
|
||||
|
||||
Reference in new issue
Block a user