From 052b69084b1fa815e39ff62179ccb062cfffdb80 Mon Sep 17 00:00:00 2001 From: Feng Ruohang Date: Wed, 25 Nov 2026 12:00:53 +0800 Subject: [PATCH] Document mcli empty-directory mirror behavior Signed-off-by: Feng Ruohang --- content/reference/minio-mc/mc-mirror.md | 2 ++ content/reference/minio-mc/mc-mirror.zh.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/content/reference/minio-mc/mc-mirror.md b/content/reference/minio-mc/mc-mirror.md index 14d9153a..177a5834 100644 --- a/content/reference/minio-mc/mc-mirror.md +++ b/content/reference/minio-mc/mc-mirror.md @@ -105,6 +105,8 @@ mc mirror [FLAGS] ~/data/ myminio/mybucket If specifying a directory, [`mc mirror`](#command-mc.mirror) synchronizes all files in the directory. +In mcli builds containing commit `59e05d3b`, the scan also copies empty local directories. For example, an empty directory named `logs/` becomes a zero-byte S3 key named `logs/` and downloads as a directory. A zero-byte key named `logs` downloads as a regular file. With `--remove`, the scan deletes empty directories that exist only at the destination. In `--watch` mode, the initial scan includes local empty directories. Run another scan to synchronize empty directories created later. [pgsty/mc#83](https://github.com/pgsty/mc/pull/83) + ##### `TARGET` {#mc.mirror.TARGET} *mc-cmd* diff --git a/content/reference/minio-mc/mc-mirror.zh.md b/content/reference/minio-mc/mc-mirror.zh.md index 2ec682d8..b19a48e2 100644 --- a/content/reference/minio-mc/mc-mirror.zh.md +++ b/content/reference/minio-mc/mc-mirror.zh.md @@ -108,6 +108,8 @@ mc mirror [FLAGS] ~/data/ myminio/mybucket 若指定的是目录,[`mc mirror`](#command-mc.mirror) 会同步该目录中的所有文件。 +包含提交 `59e05d3b` 的 mcli 也会在扫描时同步本地空目录。例如,空目录 `logs/` 上传后是一个名为 `logs/` 的零字节 S3 对象,下载后仍是目录。名为 `logs` 的零字节对象下载后是普通文件。使用 `--remove` 时,扫描会删除仅存在于目标端的空目录。`--watch` 会在初始扫描时同步本地空目录,监听期间新建的空目录需要再次扫描才能同步。[pgsty/mc#83](https://github.com/pgsty/mc/pull/83) + ##### `TARGET` {#mc.mirror.TARGET} *mc-cmd*