mirror of
https://github.com/restic/restic.git
synced 2026-11-07 07:49:21 +00:00
local/sftp: move limiter setup into backend
This commit is contained in:
1 parent
7d12c29286
commit
9aa9e0d1ec
4 files changed
+17
-15
No files matched your search
@@ -610,11 +610,6 @@ func open(ctx context.Context, s string, gopts GlobalOptions, opts options.Optio
|
||||
}
|
||||
}
|
||||
|
||||
if loc.Scheme == "local" || loc.Scheme == "sftp" {
|
||||
// wrap the backend in a LimitBackend so that the throughput is limited
|
||||
be = limiter.LimitBackend(be, lim)
|
||||
}
|
||||
|
||||
// check if config is there
|
||||
fi, err := be.Stat(ctx, restic.Handle{Type: restic.ConfigFile})
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user