-
Notifications
You must be signed in to change notification settings - Fork 560
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
minor fixes to mc share download
command; improved error messages and issue with --recursive
option. (#2099)
#2106
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2106 +/- ##
=========================================
- Coverage 8.52% 8.51% -0.01%
=========================================
Files 91 91
Lines 6806 6809 +3
=========================================
Hits 580 580
- Misses 6091 6094 +3
Partials 135 135
Continue to review full report at Codecov.
|
@badscooter23 Thanks for the patch, - can you have a more meaningful title |
mc share download
command; (improved error messages and issue with --recursive
option. (#2099)
mc share download
command; (improved error messages and issue with --recursive
option. (#2099)mc share download
command; improved error messages and issue with --recursive
option. (#2099)
Can you also modify the commit title ? @badscooter23 |
mc share download
command; improved error messages and issue with --recursive
option. (#2099)mc share download
command; improved error messages and issue with --recursive
option. (#2099)
cmd/share-download-main.go
Outdated
for _, url := range ctx.Args() { | ||
_, _, err := url2Stat(url) | ||
if err != nil { | ||
fatalIf(errDummy(), "Object `"+url+"` does not exist.") |
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.
url2Stat can send different errors other than just object may not exist. Also doesn't use the traced err. So the origination of the error is lost
To fix the message we need to fix the the odd message is originated inside client-s3.go
cmd/share-download-main.go
Outdated
for content := range clnt.List(isRecursive, isIncomplete, DirNone) { | ||
objectsCh <- content | ||
objectCount ++ |
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.
The ++ here should be objectCount++
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.
@badscooter23 - If you can amend your commit with this fix, we can take this forward.
Verified that all the test cases below are working as expected...
mc ls play/foo
should show two objectsbar1
,bar2
All of these
mc share download
commands should generate an error ...Prior to this fix, the error message above was confusing, and the middle case failed without an error message.
mc share download play/foo/bar --recursive
should generate two download share URLs...Prior to this fix, this case would give an error instead of returning the two download share URLs.