修复无法正确安装 MultiMC 整合包的问题 - #6584
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ff7de23d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| throw new IllegalArgumentException("MaintainTask requires independent game version"); | ||
| GameInstanceManifest newVersion = maintain(repository, manifest.resolve(repository)); | ||
| return newVersion.withPatches(manifest.getPatches()); | ||
| return newVersion.patches() == null ? newVersion : newVersion.withPatches(manifest.getPatches()); |
There was a problem hiding this comment.
Preserve nonempty input patches when saving
When saving any standalone manifest with nonempty patches, such as those produced by GameInstallTask or DefaultGameBuilder, manifest.resolve(repository) returns the launch view whose patches are always cleared by DefaultGameRepository.Status.resolve; maintain does not recreate them, so this condition returns the flattened manifest instead of restoring the input patches. This drops Minecraft, loader, and modpack patch metadata, causing LibraryAnalyzer to classify installed components as JUST_EXISTED and preventing later update/removal flows from manipulating the known patches correctly. The absence check needs to use the input manifest so only genuinely absent patch lists remain absent.
Useful? React with 👍 / 👎.
No description provided.