Skip to content

Conversation

@Cole-Greer
Copy link
Collaborator

Issue #, if available: #179

Description of changes:
Computed S3 file paths were resulting in invalid URIs in Windows due to the different separator.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

public S3ObjectInfo withNewKeySuffix(String suffix) {
File file = StringUtils.isNotEmpty(key) ? new File(key, suffix) : new File(suffix);
return new S3ObjectInfo( String.format("s3://%s/%s", bucket, file.getPath()));
return new S3ObjectInfo( String.format("s3://%s/%s", bucket, file.getPath().replace(File.separatorChar, '/')));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave a comment in the code describing why we are leaving the use of File here, since it might not make sense in the future.

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.

2 participants