修复 Curse 整合包更新后未移除旧的模组#6185
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates CurseInstallTask.java to read the previous manifest from manifest.json if it exists, falling back to the configuration manifest. This ensures that resolved file names are used when removing old mods during an update, preventing issues where file names are missing in the raw CurseForge manifest. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Glavo
left a comment
There was a problem hiding this comment.
本审查建议由 GPT-5 生成
已将具体审查建议标注在对应代码行。
在更新Curse模组包时,不再删除覆盖目录mods子文件夹内已存在的本地模组,仅删除清单中不存在的外部模组
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces changes to CurseInstallTask.java to prevent the deletion of overridden mods during updates. It adds a helper method getNewOverridesMods() to parse the modpack zip and extract overrides, and updates the execute() method to read the enriched manifest from manifest.json if available. A critical bug was identified in getNewOverridesMods() where path normalization mismatches prevent the correct detection of overrides, and a code suggestion has been provided to resolve this issue.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…nstallTask.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the CurseForge modpack installation task to prevent deleting mods that are included in the new overrides when updating. It also attempts to read the previous manifest from manifest.json to ensure resolved file names are used. The review feedback correctly identifies a potential NullPointerException if manifest.json is empty or corrupt, as JsonUtils.fromJsonFile could return null and calling .files() on it would cause the task to crash without being caught by the existing try-catch block. A code suggestion was provided to safely handle this case.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
处理读取旧manifest文件失败或解析后为空的情况,避免空指针
Fix #4315