fix(s3): treat NoSuchKey as success in bulk DeleteObjects

This commit is contained in:
Mathew Storm
2026-06-08 16:37:11 -04:00
committed by Alex
parent 1b28094f20
commit cd26594673
2 changed files with 26 additions and 10 deletions
+15 -2
View File
@@ -83,8 +83,21 @@ pub async fn handle_delete_objects(
}
ret_deleted.push(s3_xml::Deleted {
key: s3_xml::Value(obj.key.clone()),
version_id: s3_xml::Value(hex::encode(deleted_version)),
delete_marker_version_id: s3_xml::Value(hex::encode(delete_marker_version)),
version_id: Some(s3_xml::Value(hex::encode(deleted_version))),
delete_marker_version_id: Some(s3_xml::Value(hex::encode(
delete_marker_version,
))),
});
}
Err(Error::NoSuchKey) => {
if cmd.quiet {
continue;
}
// Deleting a non-existent key is a success in S3
ret_deleted.push(s3_xml::Deleted {
key: s3_xml::Value(obj.key.clone()),
version_id: None,
delete_marker_version_id: None,
});
}
Err(e) => {