diff options
Diffstat (limited to 'src/burn/engine/cache.cpp')
-rw-r--r-- | src/burn/engine/cache.cpp | 12 |
1 files changed, 5 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 | ||