diff --git a/src/storage/s3.js b/src/storage/s3.js index 251126e90..8358d8584 100644 --- a/src/storage/s3.js +++ b/src/storage/s3.js @@ -351,7 +351,7 @@ async function listDir(apiConfig, remotePath, batchSize, marker) { const fullRemotePath = path.join(apiConfig.prefix, remotePath); const listParams = { Bucket: apiConfig.bucket, - Prefix: fullRemotePath, + Prefix: fullRemotePath + '/', // ensure we list contents of the directory and not match other filenames with prefix MaxKeys: batchSize }; if (marker) listParams.ContinuationToken = marker;