MCPcopy
hub / github.com/rclone/rclone / applyContext

Method applyContext

cmd/bisync/cmd.go:205–221  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

203}
204
205func (opt *Options) applyContext(ctx context.Context) {
206 maxDelete := DefaultMaxDelete
207 ci := fs.GetConfig(ctx)
208 if ci.MaxDelete >= 0 {
209 maxDelete = int(ci.MaxDelete)
210 }
211 if maxDelete < 0 {
212 maxDelete = 0
213 }
214 if maxDelete > 100 {
215 maxDelete = 100
216 }
217 opt.MaxDelete = maxDelete
218 // reset MaxDelete for fs/operations, bisync handles this parameter specially
219 ci.MaxDelete = -1
220 opt.DryRun = ci.DryRun
221}
222
223func (opt *Options) setDryRun(ctx context.Context) context.Context {
224 ctxNew, ci := fs.AddConfig(ctx)

Callers 1

cmd.goFile · 0.80

Calls 1

GetConfigFunction · 0.92

Tested by

no test coverage detected