mirror of
https://github.com/rclone/rclone.git
synced 2026-01-09 20:13:21 +00:00
This adds a context.Context parameter to NewFs and related calls. This is necessary as part of reading config from the context - backends need to be able to read the global config.
This commit is contained in:
@@ -76,7 +76,7 @@ The vfsOpt are as described in options/get and can be seen in the the
|
||||
}
|
||||
|
||||
// mountRc allows the mount command to be run from rc
|
||||
func mountRc(_ context.Context, in rc.Params) (out rc.Params, err error) {
|
||||
func mountRc(ctx context.Context, in rc.Params) (out rc.Params, err error) {
|
||||
mountPoint, err := in.GetString("mountPoint")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -110,7 +110,7 @@ func mountRc(_ context.Context, in rc.Params) (out rc.Params, err error) {
|
||||
}
|
||||
|
||||
// Get Fs.fs to be mounted from fs parameter in the params
|
||||
fdst, err := rc.GetFs(in)
|
||||
fdst, err := rc.GetFs(ctx, in)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user