s3: remove leading slash in CopySource
This commit is contained in:
@@ -364,12 +364,12 @@ async function listDir(config, remotePath, batchSize, marker) {
|
||||
// See aws-sdk-js/issues/1302
|
||||
function encodeCopySource(bucket, path) {
|
||||
// AWS percent-encodes some extra non-standard characters in a URI
|
||||
const output = encodeURI(path).replace(/[+!"#$@&'()*+,:;=?@]/g, function(ch) {
|
||||
const output = encodeURI(path).replace(/[+!"#$@&'()*,:;=?@]/g, function(ch) {
|
||||
return '%' + ch.charCodeAt(0).toString(16).toUpperCase();
|
||||
});
|
||||
|
||||
// the slash at the beginning is optional
|
||||
return `/${bucket}/${output}`;
|
||||
// the slash at the beginning is optional. adding it breaks atleast intercolo.de
|
||||
return `${bucket}/${output}`;
|
||||
}
|
||||
|
||||
async function copyInternal(config, fullFromPath, fullToPath, fileSize, progressCallback) {
|
||||
|
||||
Reference in New Issue
Block a user