mirror of
https://github.com/restic/restic.git
synced 2026-06-11 11:29:44 +00:00
backends: pass error logger to backends
This commit is contained in:
@@ -414,7 +414,7 @@ func OpenRepository(ctx context.Context, opts GlobalOptions, printer progress.Pr
|
||||
}
|
||||
|
||||
// start using the cache
|
||||
s.UseCache(c)
|
||||
s.UseCache(c, printer.E)
|
||||
|
||||
oldCacheDirs, err := cache.Old(c.Base)
|
||||
if err != nil {
|
||||
@@ -492,9 +492,9 @@ func innerOpen(ctx context.Context, s string, gopts GlobalOptions, opts options.
|
||||
|
||||
var be backend.Backend
|
||||
if create {
|
||||
be, err = factory.Create(ctx, cfg, rt, lim)
|
||||
be, err = factory.Create(ctx, cfg, rt, lim, printer.E)
|
||||
} else {
|
||||
be, err = factory.Open(ctx, cfg, rt, lim)
|
||||
be, err = factory.Open(ctx, cfg, rt, lim, printer.E)
|
||||
}
|
||||
|
||||
if errors.Is(err, backend.ErrNoRepository) {
|
||||
|
||||
Reference in New Issue
Block a user