diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-16 10:48:38 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-19 23:12:55 -0500 |
| commit | 8c77de737aaea1b4857c724c730446bca8da2dd0 (patch) | |
| tree | 56159f2ea1f8407ad4b4b723ba0a75d8dcc09ec6 /src/engine/apply.cpp | |
| parent | d7b0329e16ba9cae4a33970e26591ae5f1d98f0d (diff) | |
| download | wix-8c77de737aaea1b4857c724c730446bca8da2dd0.tar.gz wix-8c77de737aaea1b4857c724c730446bca8da2dd0.tar.bz2 wix-8c77de737aaea1b4857c724c730446bca8da2dd0.zip | |
Elevate for CacheVerifyContainer/Payload.
Diffstat (limited to 'src/engine/apply.cpp')
| -rw-r--r-- | src/engine/apply.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/engine/apply.cpp b/src/engine/apply.cpp index f40b3841..0eb8a710 100644 --- a/src/engine/apply.cpp +++ b/src/engine/apply.cpp | |||
| @@ -538,6 +538,9 @@ extern "C" HRESULT ApplyCache( | |||
| 538 | 538 | ||
| 539 | if (!pPackage->fPerMachine && !cacheContext.wzLayoutDirectory) | 539 | if (!pPackage->fPerMachine && !cacheContext.wzLayoutDirectory) |
| 540 | { | 540 | { |
| 541 | hr = CacheGetCompletedPath(FALSE, pPackage->sczCacheId, &pPackage->sczCacheFolder); | ||
| 542 | ExitOnFailure(hr, "Failed to get cached path for package with cache id: %ls", pPackage->sczCacheId); | ||
| 543 | |||
| 541 | cacheContext.hPipe = INVALID_HANDLE_VALUE; | 544 | cacheContext.hPipe = INVALID_HANDLE_VALUE; |
| 542 | } | 545 | } |
| 543 | 546 | ||
| @@ -800,12 +803,6 @@ static HRESULT ApplyCachePackage( | |||
| 800 | HRESULT hr = S_OK; | 803 | HRESULT hr = S_OK; |
| 801 | BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION cachePackageCompleteAction = BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_NONE; | 804 | BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION cachePackageCompleteAction = BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_NONE; |
| 802 | 805 | ||
| 803 | if (!pPackage->sczCacheFolder && !pContext->wzLayoutDirectory) | ||
| 804 | { | ||
| 805 | hr = CacheGetCompletedPath(pPackage->fPerMachine, pPackage->sczCacheId, &pPackage->sczCacheFolder); | ||
| 806 | ExitOnFailure(hr, "Failed to get cached path for package with cache id: %ls", pPackage->sczCacheId); | ||
| 807 | } | ||
| 808 | |||
| 809 | for (;;) | 806 | for (;;) |
| 810 | { | 807 | { |
| 811 | hr = UserExperienceOnCachePackageBegin(pContext->pUX, pPackage->sczId, pPackage->payloads.cPayloads, pPackage->payloads.qwTotalSize); | 808 | hr = UserExperienceOnCachePackageBegin(pContext->pUX, pPackage->sczId, pPackage->payloads.cPayloads, pPackage->payloads.qwTotalSize); |
| @@ -1038,7 +1035,11 @@ static HRESULT ApplyCacheVerifyContainerOrPayload( | |||
| 1038 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pContext->pUX, wzPackageOrContainerId, wzPayloadId); | 1035 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pContext->pUX, wzPackageOrContainerId, wzPayloadId); |
| 1039 | ExitOnRootFailure(hr, "BA aborted cache container or payload verify begin."); | 1036 | ExitOnRootFailure(hr, "BA aborted cache container or payload verify begin."); |
| 1040 | 1037 | ||
| 1041 | if (pContainer) | 1038 | if (INVALID_HANDLE_VALUE != pContext->hPipe) |
| 1039 | { | ||
| 1040 | hr = ElevationCacheVerifyContainerOrPayload(pContext->hPipe, pContainer, pPackage, pPayload, pContext->wzLayoutDirectory); | ||
| 1041 | } | ||
| 1042 | else if (pContainer) | ||
| 1042 | { | 1043 | { |
| 1043 | hr = CacheVerifyContainer(pContainer, pContext->wzLayoutDirectory); | 1044 | hr = CacheVerifyContainer(pContainer, pContext->wzLayoutDirectory); |
| 1044 | } | 1045 | } |
