1
0
mirror of https://github.com/rclone/rclone.git synced 2025-11-23 21:44:49 +02:00

internetarchive: fix server side copy files with &

Before this change, server side copy of files with & gave the error:

    Invalid Argument</Message><Resource>x-(amz|archive)-copy-source
    header has bad character

This fix switches to using url.QueryEscape which escapes everything
from url.PathEscape which doesn't escape &.

Fixes #8754
This commit is contained in:
Nick Craig-Wood
2025-08-18 17:26:25 +01:00
parent d70f40229e
commit 4c5764204d

View File

@@ -1339,7 +1339,7 @@ func quotePath(s string) string {
seg := strings.Split(s, "/")
newValues := []string{}
for _, v := range seg {
newValues = append(newValues, url.PathEscape(v))
newValues = append(newValues, url.QueryEscape(v))
}
return strings.Join(newValues, "/")
}