diff --git a/src/SiVaContainer.cpp b/src/SiVaContainer.cpp index 5ed0e9181..9bf0324b1 100644 --- a/src/SiVaContainer.cpp +++ b/src/SiVaContainer.cpp @@ -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 buf{}; @@ -375,7 +375,7 @@ unique_ptr 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;