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

Unable to process files with a hash sign in commands file #309

Closed
giubil opened this issue Jul 2, 2021 · 0 comments · Fixed by #422
Closed

Unable to process files with a hash sign in commands file #309

giubil opened this issue Jul 2, 2021 · 0 comments · Fixed by #422
Assignees
Labels
Milestone

Comments

@giubil
Copy link

giubil commented Jul 2, 2021

When using the run command, it's not possible to process files which have a # in their names (which is a valid character in S3), as they are interpreted as inline comments.

It's not possible to escape them either, as the \ is passed on to S3.

Example with file s3://dummy/foo/test \#3 /bar.jpg (filenames were removed) :

$ s5cmd --dry-run run test                                                          
mv s3://dummy/foo/test \#3 /bar.jpg s3://dummy/foo/test \#3/bar.jpg
$ s5cmd --log debug run test
ERROR "mv s3://dummy/foo/test \\#3 /bar.jpg s3://dummy/foo/test \\#3/bar.jpg": NoSuchKey: The specified key does not exist. status code: 404, request id: DJQNRYQN42QTWC7E, host id: YF1dXLn/wFe7VXNidbR8KCgZVRWqYdtpLmnvDDM9WfIGVSq3egUslUjQ8lgOlRnAON1B0Rkgr3Y=
@igungor igungor added the bug label Jul 2, 2021
@ilkinulas ilkinulas added this to the v2.0.0 milestone Sep 20, 2021
@igungor igungor self-assigned this Feb 21, 2022
igungor added a commit that referenced this issue Apr 6, 2022
Previously s5cmd supported a command with an inline comment like `ls s3://bucket/object.gz  # inline comment` was supported.

Comment per line is still supported.

Fixes #309
igungor added a commit that referenced this issue Apr 6, 2022
* command/run: drop inline comment support

Previously s5cmd supported a command with an inline comment like `ls s3://bucket/object.gz  # inline comment` was supported.

Comment per line is still supported.

Fixes #309

* e2e/run: fix test case

* changelog: fix wording
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants