aboutsummaryrefslogtreecommitdiff
path: root/src/burn
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-09-15 12:17:47 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-09-15 14:14:04 -0500
commita470bbc209dff298dbf86a29393d6a2a8b768dc8 (patch)
tree7592437afb9bee4751d2e3393c655876b7c62077 /src/burn
parent95e8b1be902cce3b5a394066a62e0c32d0688261 (diff)
downloadwix-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')
-rw-r--r--src/burn/engine/cache.cpp12
-rw-r--r--src/burn/engine/engine.mc7
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
1040LExit: 1040LExit:
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
862Cached non-vital package: %1!ls!, encountered error: 0x%2!x!. Continuing... 862Cached non-vital package: %1!ls!, encountered error: 0x%2!x!. Continuing...
863. 863.
864 864
865MessageId=345
866Severity=Warning
867SymbolicName=MSG_IGNORING_CACHE_BUNDLE_FAILURE
868Language=English
869Ignoring failure to cache bundle because the file already exists, encountered error: 0x%1!x!. Continuing...
870.
871
865MessageId=346 872MessageId=346
866Severity=Warning 873Severity=Warning
867SymbolicName=MSG_CACHE_RETRYING_PACKAGE 874SymbolicName=MSG_CACHE_RETRYING_PACKAGE