aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/ca
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Util/ca')
-rw-r--r--src/ext/Util/ca/XmlConfig.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/ext/Util/ca/XmlConfig.cpp b/src/ext/Util/ca/XmlConfig.cpp
index 2014e15f..3f059435 100644
--- a/src/ext/Util/ca/XmlConfig.cpp
+++ b/src/ext/Util/ca/XmlConfig.cpp
@@ -266,11 +266,11 @@ static HRESULT ProcessChanges(
266 // Keep track of where our next spot will be since our current node may be moved 266 // Keep track of where our next spot will be since our current node may be moved
267 pxfcNext = pxfc->pxfcNext; 267 pxfcNext = pxfc->pxfcNext;
268 268
269 // With each node, check to see if it's element path matches the Id of some other node in the list 269 // With each node, check to see if its element path matches the Id of some other node in the list
270 pxfcCheck = *ppxfcHead; 270 pxfcCheck = *ppxfcHead;
271 while (pxfcCheck) 271 while (pxfcCheck)
272 { 272 {
273 if (pxfc->pwzElementId) 273 if (pxfc->pwzElementId && *pxfc->pwzElementId)
274 { 274 {
275 if (0 == lstrcmpW(pxfc->pwzElementId, pxfcCheck->wzId) 275 if (0 == lstrcmpW(pxfc->pwzElementId, pxfcCheck->wzId)
276 && 0 == pxfc->iXmlFlags 276 && 0 == pxfc->iXmlFlags
@@ -315,11 +315,6 @@ static HRESULT ProcessChanges(
315 pxfcCheck->cAdditionalChanges = ++cAdditionalChanges; 315 pxfcCheck->cAdditionalChanges = ++cAdditionalChanges;
316 } 316 }
317 } 317 }
318 else
319 {
320 hr = E_NOTFOUND;
321 ExitOnRootFailure(hr, "failed to find matching ElementId: %ls", pxfc->pwzElementId);
322 }
323 } 318 }
324 319
325 pxfcCheck = pxfcCheck->pxfcNext; 320 pxfcCheck = pxfcCheck->pxfcNext;
@@ -402,10 +397,10 @@ static HRESULT WriteChangeData(
402 397
403 HRESULT hr = S_OK; 398 HRESULT hr = S_OK;
404 XML_CONFIG_CHANGE* pxfcAdditionalChanges = NULL; 399 XML_CONFIG_CHANGE* pxfcAdditionalChanges = NULL;
405 LPCWSTR wzElementPath = pxfc->pwzElementId ? pxfc->pwzElementId : pxfc->pwzElementPath; 400 LPCWSTR wzElementPath = pxfc->pwzElementId && *pxfc->pwzElementId ? pxfc->pwzElementId : pxfc->pwzElementPath;
406 401
407 hr = WcaWriteStringToCaData(wzElementPath, ppwzCustomActionData); 402 hr = WcaWriteStringToCaData(wzElementPath, ppwzCustomActionData);
408 ExitOnFailure(hr, "failed to write ElementPath to custom action data: %ls", wzElementPath); 403 ExitOnFailure(hr, "failed to write ElementId/ElementPath to custom action data: %ls", wzElementPath);
409 404
410 hr = WcaWriteStringToCaData(pxfc->pwzVerifyPath, ppwzCustomActionData); 405 hr = WcaWriteStringToCaData(pxfc->pwzVerifyPath, ppwzCustomActionData);
411 ExitOnFailure(hr, "failed to write VerifyPath to custom action data: %ls", pxfc->pwzVerifyPath); 406 ExitOnFailure(hr, "failed to write VerifyPath to custom action data: %ls", pxfc->pwzVerifyPath);