diff --git a/src/storage/s3.js b/src/storage/s3.js index cebff16bd..139e223a5 100644 --- a/src/storage/s3.js +++ b/src/storage/s3.js @@ -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) {