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

storage: unknown url format #449

Closed
timotheecour4 opened this issue Jun 25, 2022 · 1 comment · Fixed by #459
Closed

storage: unknown url format #449

timotheecour4 opened this issue Jun 25, 2022 · 1 comment · Fixed by #459
Assignees
Milestone

Comments

@timotheecour4
Copy link

works:
aws s3 ls s3://foo/bar/s3://baz
fails:
s5cmd ls s3://foo/bar/s3://baz
storage: unknown url format

(keys like these should be legal)

@igungor igungor added this to s5cmd Jun 29, 2022
@igungor igungor added this to the v2.1.0 milestone Jun 29, 2022
@boraberke boraberke moved this to In Progress in s5cmd Jun 30, 2022
@boraberke boraberke added the bug label Jul 5, 2022
@boraberke
Copy link
Contributor

Also related to #352.

boraberke added a commit to boraberke/s5cmd that referenced this issue Jul 5, 2022
This commit allows url with adjacent slashes to be handled correctly.

- Disabled RestProtocolURICleaning (link) as it do not allow adjacent slashes.
- Changed path.Join method to strings.Join when joined remote urls. path.Join also cleans paths which removes additional slashes.
- Kept local urls to be joined with path.Join.
- Added test cases for copy;
    - Remote to local
    - Local to remote
    - Remote to remote
- Removed redundant trailing slashes in the keys of s3 objects in ls_test.go and sync_test.go files.

Fixes: peak#352 ,peak#449
@boraberke boraberke moved this from In Progress to Done in s5cmd Jul 18, 2022
igungor pushed a commit that referenced this issue Jul 22, 2022
This commit allows url with adjacent slashes to be handled correctly.

- Disabled RestProtocolURICleaning (link) as it do not allow adjacent slashes.
- Changed path.Join method to strings.Join when joined remote urls. path.Join also cleans paths which removes additional slashes.
- Kept local urls to be joined with path.Join.
- Added test cases for copy;
    - Remote to local
    - Local to remote
    - Remote to remote
- Removed redundant trailing slashes in the keys of s3 objects in ls_test.go and sync_test.go files.

Fixes #352
Fixes #449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants