1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 02:23:24 +00:00

fshttp: read config from ctx not passed in ConfigInfo #4685

This commit is contained in:
Nick Craig-Wood
2020-11-13 15:24:43 +00:00
parent 2e21c58e6a
commit 9d574c0d63
30 changed files with 52 additions and 48 deletions

View File

@@ -1502,7 +1502,7 @@ type copyURLFunc func(ctx context.Context, dstFileName string, in io.ReadCloser,
// copyURLFn copies the data from the url to the function supplied
func copyURLFn(ctx context.Context, dstFileName string, url string, dstFileNameFromURL bool, fn copyURLFunc) (err error) {
client := fshttp.NewClient(fs.GetConfig(ctx))
client := fshttp.NewClient(ctx)
resp, err := client.Get(url)
if err != nil {
return err