diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-05-02 16:48:40 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-05-11 19:11:19 -0500 |
commit | 4e2054b3ee31b2b9fae3269d76e08817a36fb51f (patch) | |
tree | e8c1f89225061d1fc253b444f9c3cac50118eeb9 /src/burn/engine/apply.cpp | |
parent | 5cb01b477d85920662112d63b5a44b75c03762a9 (diff) | |
download | wix-4e2054b3ee31b2b9fae3269d76e08817a36fb51f.tar.gz wix-4e2054b3ee31b2b9fae3269d76e08817a36fb51f.tar.bz2 wix-4e2054b3ee31b2b9fae3269d76e08817a36fb51f.zip |
Reset the package's cache folder only once.
This behavior makes it work similar to the root package cache folder and avoids performance problems when there are many payloads in the package.
#4774
Diffstat (limited to 'src/burn/engine/apply.cpp')
-rw-r--r-- | src/burn/engine/apply.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 58d41b28..f0b78e81 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
@@ -549,12 +549,19 @@ extern "C" HRESULT ApplyCache( | |||
549 | case BURN_CACHE_ACTION_TYPE_PACKAGE: | 549 | case BURN_CACHE_ACTION_TYPE_PACKAGE: |
550 | pPackage = pCacheAction->package.pPackage; | 550 | pPackage = pCacheAction->package.pPackage; |
551 | 551 | ||
552 | if (!pPackage->fPerMachine && !cacheContext.wzLayoutDirectory) | 552 | if (!cacheContext.wzLayoutDirectory) |
553 | { | 553 | { |
554 | hr = CacheGetCompletedPath(FALSE, pPackage->sczCacheId, &pPackage->sczCacheFolder); | 554 | if (!pPackage->fPerMachine || INVALID_HANDLE_VALUE == cacheContext.hPipe) |
555 | ExitOnFailure(hr, "Failed to get cached path for package with cache id: %ls", pPackage->sczCacheId); | 555 | { |
556 | hr = CachePreparePackage(pPackage); | ||
556 | 557 | ||
557 | cacheContext.hPipe = INVALID_HANDLE_VALUE; | 558 | cacheContext.hPipe = INVALID_HANDLE_VALUE; |
559 | } | ||
560 | else | ||
561 | { | ||
562 | hr = ElevationCachePreparePackage(hPipe, pPackage); | ||
563 | } | ||
564 | LogExitOnFailure(hr, MSG_CACHE_PREPARE_PACKAGE_FAILED, "Cache prepare package failed: %ls", pPackage->sczId, NULL, NULL); | ||
558 | } | 565 | } |
559 | 566 | ||
560 | hr = ApplyCachePackage(&cacheContext, pPackage); | 567 | hr = ApplyCachePackage(&cacheContext, pPackage); |