cloudyr / aws.s3

Amazon Simple Storage Service (S3) API Client
https://cloud.r-project.org/package=aws.s3
381 stars 147 forks source link

"//" in path results in "NoSuchKey" #426

Open nick-youngblut opened 1 year ago

nick-youngblut commented 1 year ago

Before filing an issue, please make sure you are using the latest development version which you can install using install.packages("aws.s3",repo="https://rforge.net") (see README) since the issue may have been fixed already. Also search existing issues first to avoid duplicates.

Please specify whether your issue is about:


At least for aws.s3::s3read_using(), if the object path includes >1 consecutive forward slash (e.g., path/to/my//file.txt), then the file path is considered invalid, and the user get the return: NoSuchKey.

I know that this is a limitation of AWS, but it would be great if s3read_using included code to filter out repeated forward slashes (e.g,. object <- gsub('/+', '/', object)), especially given how "simple" file.path() is, in regards to dealing with repeated forward slashes.

I'm using aws.s3 0.3.21