Skip to content

Commit c68b0a7

Browse files
committed
[Sophon] Avoid downloading files which don't have patch reference
1 parent cb5025a commit c68b0a7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CollapseLauncher/Classes/InstallManagement/Base/InstallManagerBase.SophonPatch.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,14 @@ protected async Task<bool> SpawnAdditionalPackageDownloadDialog(long baseDownloa
338338
Logger.LogWriteLine($"Getting diff for matching field: {matchingField}", LogType.Debug, true);
339339

340340
// Get the manifest pair based on the matching field
341-
SophonChunkManifestInfoPair patchManifest = rootPatchManifest
342-
.GetOtherPatchInfoPair(matchingField, updateVersionfrom);
341+
if (!rootPatchManifest
342+
.TryGetOtherPatchInfoPair(matchingField, updateVersionfrom, out var patchManifest))
343+
{
344+
Logger.LogWriteLine($"[InstallManagerBase::GetAlterSophonPatchAssets] Cannot find past-version patch manifest for matching field: {matchingField}, Skipping!",
345+
LogType.Warning,
346+
true);
347+
continue;
348+
}
343349

344350
// Get the main manifest pair based on the matching field
345351
SophonChunkManifestInfoPair mainManifest = rootMainManifest

Hi3Helper.Sophon

0 commit comments

Comments
 (0)