diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-09-15 12:17:47 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-09-15 14:14:04 -0500 |
| commit | a470bbc209dff298dbf86a29393d6a2a8b768dc8 (patch) | |
| tree | 7592437afb9bee4751d2e3393c655876b7c62077 /src/burn/engine | |
| parent | 95e8b1be902cce3b5a394066a62e0c32d0688261 (diff) | |
| download | wix-a470bbc209dff298dbf86a29393d6a2a8b768dc8.tar.gz wix-a470bbc209dff298dbf86a29393d6a2a8b768dc8.tar.bz2 wix-a470bbc209dff298dbf86a29393d6a2a8b768dc8.zip | |
Ignore cache bundle failure if it already exists in the package cache.
Fixes 6848
Diffstat (limited to 'src/burn/engine')
| -rw-r--r-- | src/burn/engine/cache.cpp | 12 | ||||
| -rw-r--r-- | src/burn/engine/engine.mc | 7 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/burn/engine/cache.cpp b/src/burn/engine/cache.cpp index 01237162..251cd24b 100644 --- a/src/burn/engine/cache.cpp +++ b/src/burn/engine/cache.cpp | |||
| @@ -1000,8 +1000,6 @@ extern "C" HRESULT CacheCompleteBundle( | |||
| 1000 | BOOL fPathEqual = FALSE; | 1000 | BOOL fPathEqual = FALSE; |
| 1001 | LPWSTR sczTargetDirectory = NULL; | 1001 | LPWSTR sczTargetDirectory = NULL; |
| 1002 | LPWSTR sczTargetPath = NULL; | 1002 | LPWSTR sczTargetPath = NULL; |
| 1003 | LPWSTR sczSourceDirectory = NULL; | ||
| 1004 | LPWSTR sczPayloadSourcePath = NULL; | ||
| 1005 | 1003 | ||
| 1006 | hr = CreateCompletedPath(pCache, fPerMachine, wzBundleId, NULL, &sczTargetDirectory); | 1004 | hr = CreateCompletedPath(pCache, fPerMachine, wzBundleId, NULL, &sczTargetDirectory); |
| 1007 | ExitOnFailure(hr, "Failed to create completed cache path for bundle."); | 1005 | ExitOnFailure(hr, "Failed to create completed cache path for bundle."); |
| @@ -1028,18 +1026,18 @@ extern "C" HRESULT CacheCompleteBundle( | |||
| 1028 | FileRemoveFromPendingRename(sczTargetPath); // best effort to ensure bundle is not deleted from cache post restart. | 1026 | FileRemoveFromPendingRename(sczTargetPath); // best effort to ensure bundle is not deleted from cache post restart. |
| 1029 | 1027 | ||
| 1030 | hr = FileEnsureCopyWithRetry(wzSourceBundlePath, sczTargetPath, TRUE, FILE_OPERATION_RETRY_COUNT, FILE_OPERATION_RETRY_WAIT); | 1028 | hr = FileEnsureCopyWithRetry(wzSourceBundlePath, sczTargetPath, TRUE, FILE_OPERATION_RETRY_COUNT, FILE_OPERATION_RETRY_WAIT); |
| 1029 | if (FAILED(hr) && FileExistsEx(sczTargetPath, NULL)) | ||
| 1030 | { | ||
| 1031 | LogId(REPORT_WARNING, MSG_IGNORING_CACHE_BUNDLE_FAILURE, hr); | ||
| 1032 | ExitFunction1(hr = S_OK); | ||
| 1033 | } | ||
| 1031 | ExitOnFailure(hr, "Failed to cache bundle from: '%ls' to '%ls'", wzSourceBundlePath, sczTargetPath); | 1034 | ExitOnFailure(hr, "Failed to cache bundle from: '%ls' to '%ls'", wzSourceBundlePath, sczTargetPath); |
| 1032 | 1035 | ||
| 1033 | // Reset the path permissions in the cache. | 1036 | // Reset the path permissions in the cache. |
| 1034 | hr = ResetPathPermissions(fPerMachine, sczTargetPath); | 1037 | hr = ResetPathPermissions(fPerMachine, sczTargetPath); |
| 1035 | ExitOnFailure(hr, "Failed to reset permissions on cached bundle: '%ls'", sczTargetPath); | 1038 | ExitOnFailure(hr, "Failed to reset permissions on cached bundle: '%ls'", sczTargetPath); |
| 1036 | 1039 | ||
| 1037 | hr = PathGetDirectory(wzSourceBundlePath, &sczSourceDirectory); | ||
| 1038 | ExitOnFailure(hr, "Failed to get directory from engine working path: %ls", wzSourceBundlePath); | ||
| 1039 | |||
| 1040 | LExit: | 1040 | LExit: |
| 1041 | ReleaseStr(sczPayloadSourcePath); | ||
| 1042 | ReleaseStr(sczSourceDirectory); | ||
| 1043 | ReleaseStr(sczTargetPath); | 1041 | ReleaseStr(sczTargetPath); |
| 1044 | ReleaseStr(sczTargetDirectory); | 1042 | ReleaseStr(sczTargetDirectory); |
| 1045 | 1043 | ||
diff --git a/src/burn/engine/engine.mc b/src/burn/engine/engine.mc index cebd1325..39aea60e 100644 --- a/src/burn/engine/engine.mc +++ b/src/burn/engine/engine.mc | |||
| @@ -862,6 +862,13 @@ Language=English | |||
| 862 | Cached non-vital package: %1!ls!, encountered error: 0x%2!x!. Continuing... | 862 | Cached non-vital package: %1!ls!, encountered error: 0x%2!x!. Continuing... |
| 863 | . | 863 | . |
| 864 | 864 | ||
| 865 | MessageId=345 | ||
| 866 | Severity=Warning | ||
| 867 | SymbolicName=MSG_IGNORING_CACHE_BUNDLE_FAILURE | ||
| 868 | Language=English | ||
| 869 | Ignoring failure to cache bundle because the file already exists, encountered error: 0x%1!x!. Continuing... | ||
| 870 | . | ||
| 871 | |||
| 865 | MessageId=346 | 872 | MessageId=346 |
| 866 | Severity=Warning | 873 | Severity=Warning |
| 867 | SymbolicName=MSG_CACHE_RETRYING_PACKAGE | 874 | SymbolicName=MSG_CACHE_RETRYING_PACKAGE |
