diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-25 21:44:40 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-25 22:58:23 -0500 |
| commit | 666196071cf29d9b489e598a604ae0998c98b6de (patch) | |
| tree | 99beb1896ca9b609120697031f845ed58ffda679 /src/engine/cache.cpp | |
| parent | 61a8d39f689222faa677e4bd79475cd77795c57a (diff) | |
| download | wix-666196071cf29d9b489e598a604ae0998c98b6de.tar.gz wix-666196071cf29d9b489e598a604ae0998c98b6de.tar.bz2 wix-666196071cf29d9b489e598a604ae0998c98b6de.zip | |
For payloads in a container, prefer the container over local paths.
Still consider the destination path to avoid extracting the container for every payload.
#3640
Diffstat (limited to 'src/engine/cache.cpp')
| -rw-r--r-- | src/engine/cache.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/engine/cache.cpp b/src/engine/cache.cpp index 764de065..2a40010d 100644 --- a/src/engine/cache.cpp +++ b/src/engine/cache.cpp | |||
| @@ -441,7 +441,8 @@ extern "C" HRESULT CacheGetLocalSourcePaths( | |||
| 441 | __in BURN_VARIABLES* pVariables, | 441 | __in BURN_VARIABLES* pVariables, |
| 442 | __inout LPWSTR** prgSearchPaths, | 442 | __inout LPWSTR** prgSearchPaths, |
| 443 | __out DWORD* pcSearchPaths, | 443 | __out DWORD* pcSearchPaths, |
| 444 | __out DWORD* pdwLikelySearchPath | 444 | __out DWORD* pdwLikelySearchPath, |
| 445 | __out DWORD* pdwDestinationSearchPath | ||
| 445 | ) | 446 | ) |
| 446 | { | 447 | { |
| 447 | HRESULT hr = S_OK; | 448 | HRESULT hr = S_OK; |
| @@ -454,6 +455,7 @@ extern "C" HRESULT CacheGetLocalSourcePaths( | |||
| 454 | BOOL fSourceIsAbsolute = FALSE; | 455 | BOOL fSourceIsAbsolute = FALSE; |
| 455 | DWORD cSearchPaths = 0; | 456 | DWORD cSearchPaths = 0; |
| 456 | DWORD dwLikelySearchPath = 0; | 457 | DWORD dwLikelySearchPath = 0; |
| 458 | DWORD dwDestinationSearchPath = 0; | ||
| 457 | 459 | ||
| 458 | AssertSz(vfInitializedCache, "Cache wasn't initialized"); | 460 | AssertSz(vfInitializedCache, "Cache wasn't initialized"); |
| 459 | 461 | ||
| @@ -486,6 +488,7 @@ extern "C" HRESULT CacheGetLocalSourcePaths( | |||
| 486 | hr = MemEnsureArraySize(reinterpret_cast<LPVOID*>(prgSearchPaths), cSearchPaths + 1, sizeof(LPWSTR), BURN_CACHE_MAX_SEARCH_PATHS); | 488 | hr = MemEnsureArraySize(reinterpret_cast<LPVOID*>(prgSearchPaths), cSearchPaths + 1, sizeof(LPWSTR), BURN_CACHE_MAX_SEARCH_PATHS); |
| 487 | ExitOnFailure(hr, "Failed to ensure size for search paths array."); | 489 | ExitOnFailure(hr, "Failed to ensure size for search paths array."); |
| 488 | 490 | ||
| 491 | dwDestinationSearchPath = cSearchPaths; | ||
| 489 | psczPath = *prgSearchPaths + cSearchPaths; | 492 | psczPath = *prgSearchPaths + cSearchPaths; |
| 490 | ++cSearchPaths; | 493 | ++cSearchPaths; |
| 491 | 494 | ||
| @@ -602,6 +605,7 @@ LExit: | |||
| 602 | AssertSz(cSearchPaths <= BURN_CACHE_MAX_SEARCH_PATHS, "Got more than BURN_CACHE_MAX_SEARCH_PATHS search paths"); | 605 | AssertSz(cSearchPaths <= BURN_CACHE_MAX_SEARCH_PATHS, "Got more than BURN_CACHE_MAX_SEARCH_PATHS search paths"); |
| 603 | *pcSearchPaths = cSearchPaths; | 606 | *pcSearchPaths = cSearchPaths; |
| 604 | *pdwLikelySearchPath = dwLikelySearchPath; | 607 | *pdwLikelySearchPath = dwLikelySearchPath; |
| 608 | *pdwDestinationSearchPath = dwDestinationSearchPath; | ||
| 605 | 609 | ||
| 606 | return hr; | 610 | return hr; |
| 607 | } | 611 | } |
