diff --git a/internal/repository/repository.go b/internal/repository/repository.go index 39cb5e9c3..d5da0ca5f 100644 --- a/internal/repository/repository.go +++ b/internal/repository/repository.go @@ -6,7 +6,6 @@ import ( "fmt" "io" "math" - "os" "runtime" "sort" "sync" @@ -755,12 +754,7 @@ func (r *Repository) prepareCache() error { packs := r.idx.Packs(restic.NewIDSet()) // clear old packs - err := r.cache.Clear(restic.PackFile, packs) - if err != nil { - fmt.Fprintf(os.Stderr, "error clearing pack files in cache: %v\n", err) - } - - return nil + return r.cache.Clear(restic.PackFile, packs) } // SearchKey finds a key with the supplied password, afterwards the config is