diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-08-01 17:07:25 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-08-02 09:15:14 -0500 |
commit | aacd6b677332f2e262d0df67603c246cd65d833e (patch) | |
tree | 05d4e5a127fc2b5feec6f74144bd195f337a8281 /src/burn/engine/manifest.cpp | |
parent | 457ef57f96c1706a63e8f848be3e07a58e7de6a3 (diff) | |
download | wix-aacd6b677332f2e262d0df67603c246cd65d833e.tar.gz wix-aacd6b677332f2e262d0df67603c246cd65d833e.tar.bz2 wix-aacd6b677332f2e262d0df67603c246cd65d833e.zip |
Store list of persisted well-known variables in Burn.
This allows it to reject Variables declared in the manifest that start with the reserved prefix 'Wix'.
Diffstat (limited to 'src/burn/engine/manifest.cpp')
-rw-r--r-- | src/burn/engine/manifest.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/burn/engine/manifest.cpp b/src/burn/engine/manifest.cpp index 0cd10dbb..c0d67c19 100644 --- a/src/burn/engine/manifest.cpp +++ b/src/burn/engine/manifest.cpp | |||
@@ -67,31 +67,14 @@ static HRESULT ParseFromXml( | |||
67 | { | 67 | { |
68 | HRESULT hr = S_OK; | 68 | HRESULT hr = S_OK; |
69 | IXMLDOMElement* pixeBundle = NULL; | 69 | IXMLDOMElement* pixeBundle = NULL; |
70 | IXMLDOMNode* pixnLog = NULL; | ||
71 | IXMLDOMNode* pixnChain = NULL; | 70 | IXMLDOMNode* pixnChain = NULL; |
72 | 71 | ||
73 | // get bundle element | 72 | // get bundle element |
74 | hr = pixdDocument->get_documentElement(&pixeBundle); | 73 | hr = pixdDocument->get_documentElement(&pixeBundle); |
75 | ExitOnFailure(hr, "Failed to get bundle element."); | 74 | ExitOnFailure(hr, "Failed to get bundle element."); |
76 | 75 | ||
77 | // parse the log element, if present. | 76 | hr = LoggingParseFromXml(&pEngineState->log, pixeBundle); |
78 | hr = XmlSelectSingleNode(pixeBundle, L"Log", &pixnLog); | 77 | ExitOnFailure(hr, "Failed to parse logging."); |
79 | ExitOnFailure(hr, "Failed to get Log element."); | ||
80 | |||
81 | if (S_OK == hr) | ||
82 | { | ||
83 | hr = XmlGetAttributeEx(pixnLog, L"PathVariable", &pEngineState->log.sczPathVariable); | ||
84 | if (E_NOTFOUND != hr) | ||
85 | { | ||
86 | ExitOnFailure(hr, "Failed to get Log/@PathVariable."); | ||
87 | } | ||
88 | |||
89 | hr = XmlGetAttributeEx(pixnLog, L"Prefix", &pEngineState->log.sczPrefix); | ||
90 | ExitOnFailure(hr, "Failed to get Log/@Prefix attribute."); | ||
91 | |||
92 | hr = XmlGetAttributeEx(pixnLog, L"Extension", &pEngineState->log.sczExtension); | ||
93 | ExitOnFailure(hr, "Failed to get Log/@Extension attribute."); | ||
94 | } | ||
95 | 78 | ||
96 | // get the chain element | 79 | // get the chain element |
97 | hr = XmlSelectSingleNode(pixeBundle, L"Chain", &pixnChain); | 80 | hr = XmlSelectSingleNode(pixeBundle, L"Chain", &pixnChain); |
@@ -167,7 +150,6 @@ static HRESULT ParseFromXml( | |||
167 | 150 | ||
168 | LExit: | 151 | LExit: |
169 | ReleaseObject(pixnChain); | 152 | ReleaseObject(pixnChain); |
170 | ReleaseObject(pixnLog); | ||
171 | ReleaseObject(pixeBundle); | 153 | ReleaseObject(pixeBundle); |
172 | return hr; | 154 | return hr; |
173 | } | 155 | } |