mirror of
https://github.com/restic/restic.git
synced 2026-10-08 03:17:12 +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:
1 parent
258b487d8f
commit
02634dce7a
6 files changed
+16
-24
No files matched your search
@@ -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