mirror of
https://github.com/restic/restic.git
synced 2026-05-20 00:55:34 +00:00
restic: change Find to return ids
That way consumers no longer have to manually convert the returned name to an id.
This commit is contained in:
@@ -436,10 +436,7 @@ func runDebugExamine(ctx context.Context, gopts GlobalOptions, args []string) er
|
||||
for _, name := range args {
|
||||
id, err := restic.ParseID(name)
|
||||
if err != nil {
|
||||
name, err = restic.Find(ctx, repo.Backend(), restic.PackFile, name)
|
||||
if err == nil {
|
||||
id, err = restic.ParseID(name)
|
||||
}
|
||||
id, err = restic.Find(ctx, repo.Backend(), restic.PackFile, name)
|
||||
if err != nil {
|
||||
Warnf("error: %v\n", err)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user