From 95a09dd940da788bfa6a39574c8622c6735e80c3 Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Thu, 19 Dec 2024 07:14:01 +0530 Subject: [PATCH] fix GetBucketVersioning XML parsing Fixes #180 Signed-off-by: Bala.FA --- src/baseclient.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/baseclient.cc b/src/baseclient.cc index f25f420..46032a7 100644 --- a/src/baseclient.cc +++ b/src/baseclient.cc @@ -854,11 +854,11 @@ GetBucketVersioningResponse BaseClient::GetBucketVersioning( pugi::xpath_node text; - if (!root.node().select_node("Status")) { + if (root.node().select_node("Status")) { text = root.node().select_node("Status/text()"); response.status = (strcmp(text.node().value(), "Enabled") == 0); } - if (!root.node().select_node("MFADelete")) { + if (root.node().select_node("MFADelete")) { text = root.node().select_node("MFADelete/text()"); response.mfa_delete = (strcmp(text.node().value(), "Enabled") == 0); }