Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/miniocpp/response.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ struct StatObjectResponse : public Response {
RetentionMode retention_mode;
utils::UtcTime retention_retain_until_date;
LegalHold legal_hold;
bool delete_marker;
bool delete_marker = false;
utils::Multimap user_metadata;

StatObjectResponse() = default;
Expand Down Expand Up @@ -284,7 +284,7 @@ MINIO_S3_DERIVE_FROM_PUT_OBJECT_RESPONSE(UploadObjectResponse)
struct DeletedObject : public Response {
std::string name;
std::string version_id;
bool delete_marker;
bool delete_marker = false;
std::string delete_marker_version_id;

DeletedObject() = default;
Expand Down
3 changes: 3 additions & 0 deletions tests/tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ class Tests {
"StatObject(): expected: " + std::to_string(data.length()) +
"; got: " + std::to_string(resp->size));
}
if (resp->delete_marker) {
throw std::runtime_error("StatObject(): expected: false; got: true");
}
RemoveObject(bucket_name_, object_name);
} catch (const std::runtime_error&) {
RemoveObject(bucket_name_, object_name);
Expand Down
Loading