forked from TrueCloudLab/restic
Move FindSnapshot, make Repository.List() return IDs
This commit is contained in:
parent
cf37b619fd
commit
6e38a8a033
12 changed files with 75 additions and 97 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"path/filepath"
|
||||
|
||||
"github.com/restic/restic"
|
||||
"github.com/restic/restic/backend"
|
||||
)
|
||||
|
||||
type CmdRestore struct{}
|
||||
|
@ -40,12 +39,7 @@ func (cmd CmdRestore) Execute(args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
name, err := backend.FindSnapshot(s, args[0])
|
||||
if err != nil {
|
||||
errx(1, "invalid id %q: %v", args[0], err)
|
||||
}
|
||||
|
||||
id, err := backend.ParseID(name)
|
||||
id, err := restic.FindSnapshot(s, args[0])
|
||||
if err != nil {
|
||||
errx(1, "invalid id %q: %v", args[0], err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue