2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-29 07:00:49 +00:00

report snapshot id if loading failed

This commit is contained in:
Michael Eischer 2023-05-01 17:24:13 +02:00
parent c0627dc80d
commit 88a7231217

View File

@ -61,7 +61,7 @@ func LoadSnapshot(ctx context.Context, loader LoaderUnpacked, id ID) (*Snapshot,
sn := &Snapshot{id: &id} sn := &Snapshot{id: &id}
err := LoadJSONUnpacked(ctx, loader, SnapshotFile, id, sn) err := LoadJSONUnpacked(ctx, loader, SnapshotFile, id, sn)
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("failed to load snapshot %v: %w", id.Str(), err)
} }
return sn, nil return sn, nil