diff options
Diffstat (limited to 'src/engine/cache.cpp')
-rw-r--r-- | src/engine/cache.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/engine/cache.cpp b/src/engine/cache.cpp index 16f2c1e5..764de065 100644 --- a/src/engine/cache.cpp +++ b/src/engine/cache.cpp | |||
@@ -440,7 +440,8 @@ extern "C" HRESULT CacheGetLocalSourcePaths( | |||
440 | __in_z_opt LPCWSTR wzLayoutDirectory, | 440 | __in_z_opt LPCWSTR wzLayoutDirectory, |
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 | ) | 445 | ) |
445 | { | 446 | { |
446 | HRESULT hr = S_OK; | 447 | HRESULT hr = S_OK; |
@@ -452,6 +453,7 @@ extern "C" HRESULT CacheGetLocalSourcePaths( | |||
452 | BOOL fTryRelativePath = FALSE; | 453 | BOOL fTryRelativePath = FALSE; |
453 | BOOL fSourceIsAbsolute = FALSE; | 454 | BOOL fSourceIsAbsolute = FALSE; |
454 | DWORD cSearchPaths = 0; | 455 | DWORD cSearchPaths = 0; |
456 | DWORD dwLikelySearchPath = 0; | ||
455 | 457 | ||
456 | AssertSz(vfInitializedCache, "Cache wasn't initialized"); | 458 | AssertSz(vfInitializedCache, "Cache wasn't initialized"); |
457 | 459 | ||
@@ -473,6 +475,12 @@ extern "C" HRESULT CacheGetLocalSourcePaths( | |||
473 | hr = StrAllocString(psczPath, wzSourcePath, 0); | 475 | hr = StrAllocString(psczPath, wzSourcePath, 0); |
474 | ExitOnFailure(hr, "Failed to copy absolute source path."); | 476 | ExitOnFailure(hr, "Failed to copy absolute source path."); |
475 | } | 477 | } |
478 | else | ||
479 | { | ||
480 | // If none of the paths exist, then most BAs will want to prompt the user with a possible path. | ||
481 | // The destination path is a temporary location and so not really a possible path. | ||
482 | dwLikelySearchPath = 1; | ||
483 | } | ||
476 | 484 | ||
477 | // Try the destination path next. | 485 | // Try the destination path next. |
478 | hr = MemEnsureArraySize(reinterpret_cast<LPVOID*>(prgSearchPaths), cSearchPaths + 1, sizeof(LPWSTR), BURN_CACHE_MAX_SEARCH_PATHS); | 486 | hr = MemEnsureArraySize(reinterpret_cast<LPVOID*>(prgSearchPaths), cSearchPaths + 1, sizeof(LPWSTR), BURN_CACHE_MAX_SEARCH_PATHS); |
@@ -593,6 +601,7 @@ LExit: | |||
593 | 601 | ||
594 | AssertSz(cSearchPaths <= BURN_CACHE_MAX_SEARCH_PATHS, "Got more than BURN_CACHE_MAX_SEARCH_PATHS search paths"); | 602 | AssertSz(cSearchPaths <= BURN_CACHE_MAX_SEARCH_PATHS, "Got more than BURN_CACHE_MAX_SEARCH_PATHS search paths"); |
595 | *pcSearchPaths = cSearchPaths; | 603 | *pcSearchPaths = cSearchPaths; |
604 | *pdwLikelySearchPath = dwLikelySearchPath; | ||
596 | 605 | ||
597 | return hr; | 606 | return hr; |
598 | } | 607 | } |