mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
build: fix gocritic lint issue wrapperfunc
This commit is contained in:
committed by
Nick Craig-Wood
parent
e82b5b11af
commit
33bff6fe71
@@ -1807,7 +1807,7 @@ func copyURLFn(ctx context.Context, dstFileName string, url string, autoFilename
|
||||
if autoFilename {
|
||||
if dstFileNameFromHeader {
|
||||
_, params, err := mime.ParseMediaType(resp.Header.Get("Content-Disposition"))
|
||||
headerFilename := path.Base(strings.Replace(params["filename"], "\\", "/", -1))
|
||||
headerFilename := path.Base(strings.ReplaceAll(params["filename"], "\\", "/"))
|
||||
if err != nil || headerFilename == "" {
|
||||
return fmt.Errorf("CopyURL failed: filename not found in the Content-Disposition header")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user