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

Fix ls --recursive discrpency with prefixes #1009

Closed
wants to merge 2 commits into from

Conversation

kyleknap
Copy link
Contributor

Fixes #604

As an example of what is changed, start off with a bucket mybucket with the key foo/bar.

When we used to run aws s3 ls s3://mybucket/foo/ --recursive, it would list the object as foo/bar. This is inconsistent with aws s3 ls s3://mybucket/foo/ since it would list the object as bar.

This change makes the output consistent with the non-recusive ls.

cc @jamesls @danielgtaylor

@kyleknap
Copy link
Contributor Author

Currently, this PR will be too big of a breaking change to merge in. So instead, I propose to add extra arguments to the ls command that will allow to control the format of the keys. Here are the two options I am considering:

  1. Have a --relative and --absolute or something along those lines that will list the keys relative to the s3path provided or list the full key name respectively. This would affect both the recursive and non-recursive case.

  2. Have a --key-format argument whose value is relative or absolute and do the same functionality as in option 1.

If anyone has any opinions on this, I would greatly appreciate it. Please feel free to share. I am leaning toward option 2 because it is a little more scalable if there are any future format that are needed, will avoid bloating the amount of arguments in ls, and ensure only one key format can be specified for an ls command.

@jamesls
Copy link
Member

jamesls commented Jan 13, 2015

Closing for now. If anyone has any feedback, please feel free to chime in.

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.

aws s3 ls inconsistent file names with/without --recursive
2 participants