mirror of
https://github.com/rclone/rclone.git
synced 2025-01-11 00:40:03 +01:00
http: use string contains instead of index
This commit is contained in:
parent
162aba60eb
commit
946e84d194
@ -297,7 +297,7 @@ func parseName(base *url.URL, name string) (string, error) {
|
|||||||
}
|
}
|
||||||
// check it doesn't have URL parameters
|
// check it doesn't have URL parameters
|
||||||
uStr := u.String()
|
uStr := u.String()
|
||||||
if strings.Index(uStr, "?") >= 0 {
|
if strings.Contains(uStr, "?") {
|
||||||
return "", errFoundQuestionMark
|
return "", errFoundQuestionMark
|
||||||
}
|
}
|
||||||
// check that this is going back to the same host and scheme
|
// check that this is going back to the same host and scheme
|
||||||
|
Loading…
Reference in New Issue
Block a user