backend: Add IsNotExist

This commit is contained in:
Alexander Neumann
2017-06-15 13:40:27 +02:00
parent 6f24d038f8
commit af9ba3be91
7 changed files with 79 additions and 12 deletions

View File

@@ -152,6 +152,10 @@ func pruneRepository(gopts GlobalOptions, repo restic.Repository) error {
err = restic.FindUsedBlobs(ctx, repo, *sn.Tree, usedBlobs, seenBlobs)
if err != nil {
if repo.Backend().IsNotExist(err) {
return errors.Fatal("unable to load a tree from the repo: " + err.Error())
}
return err
}