minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

Fix broken `mc anonymous get/get-json` #4791

Closed subnix closed 10 months ago

subnix commented 10 months ago

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 license] (https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request I represent that I have the right to license the contributions to the project maintainers under the Apache 2 license.

Description

mc anonymous get/get-json have been broken by PR #4745, because it tries to guess an operation and fails before finding one. So we can avoid this by explicit operation handling.

How to test this PR?

mc anonymous get [target] mc anonymous get-json [target]

Types of changes

Checklist:

subnix commented 10 months ago

Oh, now I see fix f78f391f8beda947fbdbb1d9f22edc90af3fcc32, but it hasn't been completely fixed. It doesn't work if file/directory named TARGET exists.

mkdir -p play/upload
mc anonymous get play/upload