[Enhancement] 永久保存自定义实例图标#6097
Conversation
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/main/SettingsPage.java
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/main/SettingsPage.java
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to save custom game icons, adding a configuration setting, a settings UI, and logic to copy selected custom icons to a dedicated directory. The review feedback highlights a potential NoSuchFileException if the target directory does not exist when copying files, and points out a translation inconsistency in the Traditional Chinese localization file.
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.
| } else { | ||
| dest = GAME_ICONS_DIR.resolve(selectedFile.getFileName()); | ||
| int i = 1; |
There was a problem hiding this comment.
如果 game_icons 目录不存在,FileUtils.copyFile 可能会因为父目录不存在而抛出 NoSuchFileException。在复制文件之前,应该确保该目录已被创建。建议在解析目标路径前调用 Files.createDirectories(GAME_ICONS_DIR)。
| } else { | |
| dest = GAME_ICONS_DIR.resolve(selectedFile.getFileName()); | |
| int i = 1; | |
| } else { | |
| Files.createDirectories(GAME_ICONS_DIR); | |
| dest = GAME_ICONS_DIR.resolve(selectedFile.getFileName()); | |
| int i = 1; |
| settings.launcher.proxy.port=連線埠 | ||
| settings.launcher.proxy.socks=SOCKS | ||
| settings.launcher.proxy.username=帳戶 | ||
| settings.launcher.save_custom_game_icons=保存自定義遊戲圖標 |
Closes #5485
目前暂定保存在当前启动器实例的
.hmcl文件夹中