diff options
Diffstat (limited to 'src/burn/engine/apply.cpp')
-rw-r--r-- | src/burn/engine/apply.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index f9b33333..4ebed191 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
@@ -1350,7 +1350,7 @@ static HRESULT LayoutBundle( | |||
1350 | LPWSTR sczBundlePath = NULL; | 1350 | LPWSTR sczBundlePath = NULL; |
1351 | LPWSTR sczBundleDownloadUrl = NULL; | 1351 | LPWSTR sczBundleDownloadUrl = NULL; |
1352 | LPWSTR sczDestinationPath = NULL; | 1352 | LPWSTR sczDestinationPath = NULL; |
1353 | int nEquivalentPaths = 0; | 1353 | BOOL fPathEqual = FALSE; |
1354 | BOOTSTRAPPER_CACHE_OPERATION cacheOperation = BOOTSTRAPPER_CACHE_OPERATION_NONE; | 1354 | BOOTSTRAPPER_CACHE_OPERATION cacheOperation = BOOTSTRAPPER_CACHE_OPERATION_NONE; |
1355 | BURN_CACHE_PROGRESS_CONTEXT progress = { }; | 1355 | BURN_CACHE_PROGRESS_CONTEXT progress = { }; |
1356 | BOOL fRetry = FALSE; | 1356 | BOOL fRetry = FALSE; |
@@ -1375,10 +1375,10 @@ static HRESULT LayoutBundle( | |||
1375 | ExitOnFailure(hr, "Failed to concat layout path for bundle."); | 1375 | ExitOnFailure(hr, "Failed to concat layout path for bundle."); |
1376 | 1376 | ||
1377 | // If the destination path is the currently running bundle, bail. | 1377 | // If the destination path is the currently running bundle, bail. |
1378 | hr = PathCompare(sczBundlePath, sczDestinationPath, &nEquivalentPaths); | 1378 | hr = PathCompareCanonicalized(sczBundlePath, sczDestinationPath, &fPathEqual); |
1379 | ExitOnFailure(hr, "Failed to determine if layout bundle path was equivalent with current process path."); | 1379 | ExitOnFailure(hr, "Failed to determine if layout bundle path was equivalent with current process path."); |
1380 | 1380 | ||
1381 | if (CSTR_EQUAL == nEquivalentPaths && FileExistsEx(sczDestinationPath, NULL)) | 1381 | if (fPathEqual && FileExistsEx(sczDestinationPath, NULL)) |
1382 | { | 1382 | { |
1383 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pContext->pUX, NULL, NULL); | 1383 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pContext->pUX, NULL, NULL); |
1384 | if (FAILED(hr)) | 1384 | if (FAILED(hr)) |
@@ -1533,7 +1533,7 @@ static HRESULT AcquireContainerOrPayload( | |||
1533 | AssertSz(pContainer || pPayload, "Must provide a container or a payload."); | 1533 | AssertSz(pContainer || pPayload, "Must provide a container or a payload."); |
1534 | 1534 | ||
1535 | HRESULT hr = S_OK; | 1535 | HRESULT hr = S_OK; |
1536 | int nEquivalentPaths = 0; | 1536 | BOOL fPathEqual = FALSE; |
1537 | LPCWSTR wzPackageOrContainerId = pContainer ? pContainer->sczId : pPackage ? pPackage->sczId : NULL; | 1537 | LPCWSTR wzPackageOrContainerId = pContainer ? pContainer->sczId : pPackage ? pPackage->sczId : NULL; |
1538 | LPCWSTR wzPayloadId = pPayload ? pPayload->sczKey : NULL; | 1538 | LPCWSTR wzPayloadId = pPayload ? pPayload->sczKey : NULL; |
1539 | LPCWSTR wzPayloadContainerId = pPayload && pPayload->pContainer ? pPayload->pContainer->sczId : NULL; | 1539 | LPCWSTR wzPayloadContainerId = pPayload && pPayload->pContainer ? pPayload->pContainer->sczId : NULL; |
@@ -1673,10 +1673,10 @@ static HRESULT AcquireContainerOrPayload( | |||
1673 | { | 1673 | { |
1674 | case BOOTSTRAPPER_CACHE_OPERATION_COPY: | 1674 | case BOOTSTRAPPER_CACHE_OPERATION_COPY: |
1675 | // If the source path and destination path are different, do the copy (otherwise there's no point). | 1675 | // If the source path and destination path are different, do the copy (otherwise there's no point). |
1676 | hr = PathCompare(pContext->rgSearchPaths[dwChosenSearchPath], wzDestinationPath, &nEquivalentPaths); | 1676 | hr = PathCompareCanonicalized(pContext->rgSearchPaths[dwChosenSearchPath], wzDestinationPath, &fPathEqual); |
1677 | ExitOnFailure(hr, "Failed to determine if payload paths were equivalent, source: %ls, destination: %ls.", pContext->rgSearchPaths[dwChosenSearchPath], wzDestinationPath); | 1677 | ExitOnFailure(hr, "Failed to determine if payload paths were equivalent, source: %ls, destination: %ls.", pContext->rgSearchPaths[dwChosenSearchPath], wzDestinationPath); |
1678 | 1678 | ||
1679 | if (CSTR_EQUAL != nEquivalentPaths) | 1679 | if (!fPathEqual) |
1680 | { | 1680 | { |
1681 | hr = CopyPayload(pProgress, INVALID_HANDLE_VALUE, pContext->rgSearchPaths[dwChosenSearchPath], wzDestinationPath); | 1681 | hr = CopyPayload(pProgress, INVALID_HANDLE_VALUE, pContext->rgSearchPaths[dwChosenSearchPath], wzDestinationPath); |
1682 | ExitOnFailure(hr, "Failed to copy payload: %ls", wzPayloadId); | 1682 | ExitOnFailure(hr, "Failed to copy payload: %ls", wzPayloadId); |