s3: ensure we list directory

<timestamp>/box_v9.0.0.backupinfo ends up getting listed
when trying to list <timestamp>/box_v9.0.0 !
This commit is contained in:
Girish Ramakrishnan
2025-08-25 19:15:18 +02:00
parent 1e4df539b7
commit c44863a9bb

View File

@@ -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;