[Enhancement] 导出整合包-文件选择优化#6115
Open
ToobLac wants to merge 7 commits into
Open
Conversation
Member
|
/gemini review |
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the modpack file selection UI and filtering logic, introducing a directory-first sorting mechanism and hierarchical level tracking. However, several issues were identified: setting CheckBoxTreeItem values to empty strings breaks file path construction in the export logic, and the use of substringAfter for labels displays incorrect nested paths. Additionally, performing I/O operations like Files.isDirectory inside a comparator significantly impacts performance, and a redundant match method was introduced in the Modpack class that duplicates existing logic in ModAdviser.
Comment on lines
+124
to
+135
| private static boolean match(List<String> l, String fileName) { | ||
| for (String s : l) { | ||
| if (s.startsWith("regex:")) { | ||
| if (fileName.matches(s.substring("regex:".length()))) | ||
| return true; | ||
| } else { | ||
| if (fileName.equals(s)) | ||
| return true; | ||
| } | ||
| } | ||
| return false; | ||
| } |
Contributor
Contributor
Author
There was a problem hiding this comment.
故意拆出来的,防止出问题。本来就应该自己用自己的
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
natives-os-arch文件夹Resolves #6073 Fixes #6116
顺带提一句,电磁炉在 #5367 中的修复是没有问题的,因为所谓“其他地方”都不会传入目录,不会被他的修改影响到。