Skip to content

Commit

Permalink
Suffix S3 path with separator for recursive delete
Browse files Browse the repository at this point in the history
Without trailing path separator the recursive delete operation fails for
directory buckets (e.g. S3 Express)
  • Loading branch information
losipiuk committed Jan 22, 2025
1 parent 417f8fe commit ada67c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ private ListObjectsV2Publisher listObjectsRecursively(URI dir)

ListObjectsV2Request request = ListObjectsV2Request.builder()
.bucket(getBucketName(dir))
.prefix(keyFromUri(dir))
.prefix(keyFromUri(dir) + PATH_SEPARATOR)
.build();

return s3AsyncClient.listObjectsV2Paginator(request);
Expand Down

0 comments on commit ada67c5

Please sign in to comment.