ProjectXMLParser: don't require path to be specified in <certificate/> element to create Keystore object (can also be created if type is specified, which allows keystores without paths)

This commit is contained in:
Josh Tynjala
2022-12-30 22:05:59 -08:00
parent 7d7f6fbbd3
commit 468c193330

View File

@@ -1670,21 +1670,22 @@ class ProjectXMLParser extends HXProject
parseXML(element, "", extensionPath); parseXML(element, "", extensionPath);
case "certificate": case "certificate":
var path = null; if (element.has.path || element.has.type)
{
keystore = new Keystore();
}
if (keystore != null)
{
if (element.has.path) if (element.has.path)
{ {
path = element.att.path; keystore.path = Path.combine(extensionPath, substitute(element.att.path));
} }
else if (element.has.keystore) else if (element.has.keystore)
{ {
path = element.att.keystore; keystore.path = Path.combine(extensionPath, substitute(element.att.keystore));
} }
if (path != null)
{
keystore = new Keystore(Path.combine(extensionPath, substitute(element.att.path)));
if (element.has.type) if (element.has.type)
{ {
keystore.type = substitute(element.att.type); keystore.type = substitute(element.att.type);