Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly handle copy and delete operations on single objects #499

Merged

Conversation

sberss
Copy link
Contributor

@sberss sberss commented Jul 17, 2024

Fixes #497

The copy and delete code was currently treating /foo/ and /foo as a directory, which in the S3 context is incorrect (as perfectly summed up here). If the given path is not a directory, it should not be listing objects from S3 and returning all those that match the prefix. Rather, it should just be performing the copy/delete operation on that given object. This change adds a check for whether the given source is a directory and acts accordingly.

@sberss sberss force-pushed the correctly-handle-single-object-operations branch from 6615c05 to ac62d5a Compare July 17, 2024 09:15
@markjschreiber
Copy link
Contributor

LGTM!

@markjschreiber markjschreiber merged commit 5613083 into awslabs:main Jul 18, 2024
1 check passed
@markjschreiber
Copy link
Contributor

New release is out (2.0.4)

@sberss
Copy link
Contributor Author

sberss commented Jul 19, 2024

Thank you!

stefanofornari pushed a commit to stefanofornari/aws-java-nio-spi-for-s3 that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy and delete functionality broken for objects sharing prefix
2 participants