Skip to content

Commit

Permalink
Ask SiVa confirmation only once
Browse files Browse the repository at this point in the history
IB-7899

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma committed Nov 24, 2023
1 parent 8a28362 commit 2f3fef9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SiVaContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ SiVaContainer::SiVaContainer(const string &path, ContainerOpenCB *cb, bool useHa
else
THROW("Unknown file");

if(cb && !cb->validateOnline())
if(useHashCode && cb && !cb->validateOnline())
THROW("Online validation disabled");

array<XMLByte, 4800> buf{};
Expand Down Expand Up @@ -375,7 +375,7 @@ unique_ptr<istream> SiVaContainer::parseDDoc(bool useHashCode)
if(!item)
continue;

if(XMLString::compareString(item->getAttribute(cpXMLCh(u"ContentType")), cpXMLCh(u"HASHCODE")) == 0)
if(XMLString::compareString(item->getAttribute(u"ContentType"), u"HASHCODE") == 0)
THROW("Currently supports only content types EMBEDDED_BASE64 for DDOC format");
if(XMLString::compareString(item->getAttribute(cpXMLCh(u"ContentType")), cpXMLCh(u"EMBEDDED_BASE64")) != 0)
continue;
Expand Down

0 comments on commit 2f3fef9

Please sign in to comment.