From 6eb90e7df9a14e7f009e74a0b56947fb12d4517b Mon Sep 17 00:00:00 2001 From: LeonWang0735 Date: Thu, 5 Feb 2026 22:48:32 +0800 Subject: [PATCH] fix: fetch_owner set to true when calling list_objects_v2 in the list_objects function (#1730) Co-authored-by: houseme --- rustfs/src/storage/ecfs.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rustfs/src/storage/ecfs.rs b/rustfs/src/storage/ecfs.rs index 8596a0d94..1a8f42044 100644 --- a/rustfs/src/storage/ecfs.rs +++ b/rustfs/src/storage/ecfs.rs @@ -3721,7 +3721,13 @@ impl S3 for FS { // S3 API requires the marker field to be echoed back in the response let request_marker = req.input.marker.clone(); - let v2_resp = self.list_objects_v2(req.map_input(Into::into)).await?; + let v2_resp = self + .list_objects_v2(req.map_input(|v1| { + let mut v2: ListObjectsV2Input = v1.into(); + v2.fetch_owner = Some(true); + v2 + })) + .await?; Ok(v2_resp.map_output(|v2| { // For ListObjects (v1) API, NextMarker should be the last item returned when truncated