Skip to content

Commit 4687c99

Browse files
Merge master into feature/q-dev-execution
2 parents ba5b37d + ba3a4f7 commit 4687c99

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Resource Explorer: S3 tree view now shows bucket contents correctly, even when restricted to root prefix."
4+
}

packages/core/src/shared/clients/s3Client.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { toStream } from '../utilities/collectionUtils'
1919

2020
export const DEFAULT_MAX_KEYS = 300 // eslint-disable-line @typescript-eslint/naming-convention
2121
export const DEFAULT_DELIMITER = '/' // eslint-disable-line @typescript-eslint/naming-convention
22+
export const defaultPrefix = ''
2223

2324
export type Bucket = InterfaceNoSymbol<DefaultBucket>
2425
export type Folder = InterfaceNoSymbol<DefaultFolder>
@@ -460,7 +461,13 @@ export class DefaultS3Client {
460461
Bucket: bucket.name,
461462
Delimiter: DEFAULT_DELIMITER,
462463
MaxKeys: request.maxResults ?? DEFAULT_MAX_KEYS,
463-
Prefix: request.folderPath,
464+
/**
465+
* Set '' as the default prefix to ensure that the bucket's content will be displayed
466+
* when the user has at least list access to the root of the bucket.
467+
* https://github.com/aws/aws-toolkit-vscode/issues/4643
468+
* @default ''
469+
*/
470+
Prefix: request.folderPath ?? defaultPrefix,
464471
ContinuationToken: request.continuationToken,
465472
})
466473
.promise()

0 commit comments

Comments
 (0)