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

mc cp bug #4933

Closed cnsino closed 5 months ago

cnsino commented 5 months ago

Expected behavior (Copy to code.zip)

mc cp -r minio/assets/asset-20240425082735/abc.zip /asset-20240425082735/code.zip && cd /asset-20240425082735 && unzip code.zip

Actual behavior

However, the final copied path is:/asset-20240425082735/code.zip/abc.zip

Steps to reproduce the behavior

mc --version

klauspost commented 5 months ago

S3 has no concept of directories, so minio/assets/asset-20240425082735/abc.zip is a prefix, which can return many results. So we cannot just write it to a single file.

Either way we cannot change this behavior.