diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-04-13 18:16:55 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-04-14 12:15:52 -0700 |
| commit | d32f770ca05748df9e356444c7e617d5eeedb60c (patch) | |
| tree | 5a866f82950f9047aab6d7655ba538bcdbfb2535 /src/engine/detect.cpp | |
| parent | 6f7bb97daa1ae6bf2486b1c566c29e1b524b7548 (diff) | |
| download | wix-d32f770ca05748df9e356444c7e617d5eeedb60c.tar.gz wix-d32f770ca05748df9e356444c7e617d5eeedb60c.tar.bz2 wix-d32f770ca05748df9e356444c7e617d5eeedb60c.zip | |
Allow BA to update feed source
Fixes wixtoolset/issues#5568
Diffstat (limited to 'src/engine/detect.cpp')
| -rw-r--r-- | src/engine/detect.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/engine/detect.cpp b/src/engine/detect.cpp index 8ca74986..3a58f3dc 100644 --- a/src/engine/detect.cpp +++ b/src/engine/detect.cpp | |||
| @@ -258,6 +258,7 @@ extern "C" HRESULT DetectUpdate( | |||
| 258 | BOOL fBeginCalled = FALSE; | 258 | BOOL fBeginCalled = FALSE; |
| 259 | BOOL fSkip = TRUE; | 259 | BOOL fSkip = TRUE; |
| 260 | BOOL fIgnoreError = FALSE; | 260 | BOOL fIgnoreError = FALSE; |
| 261 | LPWSTR sczOriginalSource = NULL; | ||
| 261 | 262 | ||
| 262 | // If no update source was specified, skip update detection. | 263 | // If no update source was specified, skip update detection. |
| 263 | if (!pUpdate->sczUpdateSource || !*pUpdate->sczUpdateSource) | 264 | if (!pUpdate->sczUpdateSource || !*pUpdate->sczUpdateSource) |
| @@ -266,7 +267,11 @@ extern "C" HRESULT DetectUpdate( | |||
| 266 | } | 267 | } |
| 267 | 268 | ||
| 268 | fBeginCalled = TRUE; | 269 | fBeginCalled = TRUE; |
| 269 | hr = UserExperienceOnDetectUpdateBegin(pUX, pUpdate->sczUpdateSource, &fSkip); | 270 | |
| 271 | hr = StrAllocString(&sczOriginalSource, pUpdate->sczUpdateSource, 0); | ||
| 272 | ExitOnFailure(hr, "Failed to duplicate update feed source."); | ||
| 273 | |||
| 274 | hr = UserExperienceOnDetectUpdateBegin(pUX, sczOriginalSource, &fSkip); | ||
| 270 | ExitOnRootFailure(hr, "BA aborted detect update begin."); | 275 | ExitOnRootFailure(hr, "BA aborted detect update begin."); |
| 271 | 276 | ||
| 272 | if (!fSkip) | 277 | if (!fSkip) |
| @@ -276,6 +281,8 @@ extern "C" HRESULT DetectUpdate( | |||
| 276 | } | 281 | } |
| 277 | 282 | ||
| 278 | LExit: | 283 | LExit: |
| 284 | ReleaseStr(sczOriginalSource); | ||
| 285 | |||
| 279 | if (fBeginCalled) | 286 | if (fBeginCalled) |
| 280 | { | 287 | { |
| 281 | UserExperienceOnDetectUpdateComplete(pUX, hr, &fIgnoreError); | 288 | UserExperienceOnDetectUpdateComplete(pUX, hr, &fIgnoreError); |
