aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_list.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/s3_list.rs')
-rw-r--r--src/api/s3_list.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/s3_list.rs b/src/api/s3_list.rs
index 599d0d11..07b87d3a 100644
--- a/src/api/s3_list.rs
+++ b/src/api/s3_list.rs
@@ -150,8 +150,8 @@ pub async fn handle_list(
writeln!(&mut xml, "\t</Contents>").unwrap();
}
if result_common_prefixes.len() > 0 {
- writeln!(&mut xml, "\t<CommonPrefixes>").unwrap();
for pfx in result_common_prefixes.iter() {
+ writeln!(&mut xml, "\t<CommonPrefixes>").unwrap();
writeln!(
&mut xml,
"\t\t<Prefix>{}</Prefix>",
@@ -159,11 +159,11 @@ pub async fn handle_list(
//xml_encode_key(pfx, urlencode_resp)
)
.unwrap();
+ writeln!(&mut xml, "\t</CommonPrefixes>").unwrap();
}
- writeln!(&mut xml, "\t</CommonPrefixes>").unwrap();
}
writeln!(&mut xml, "</ListBucketResult>").unwrap();
- println!("{}", xml);
+ debug!("{}", xml);
Ok(Response::new(Body::from(xml.into_bytes())))
}