-
Notifications
You must be signed in to change notification settings - Fork 239
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/url: Allow usage of adjacent slashes #459
Conversation
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
Replaced strings.Cut method as it is undefined before go version 1.18.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boraberke could you update the changelog file to reflect this change please? I'm not sure if this is a bugfix or an improvement :)
Might even breaking for users who rely on URI cleaning 🙃 . |
Added three more entries to |
This PR allows url with adjacent slashes to be handled correctly.
Users should be careful while handling slashes in objectnames. Before this PR,
s5cmd cp /file.txt s3://bucket/
would outputBut now it will result in double slashes as follows:
Fixes: #352
Fixes: #449