Skip to content

Conversation

@CiiLu
Copy link
Contributor

@CiiLu CiiLu commented Jan 24, 2026

#5285
测试发现 kilt 没有类似的行为

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes an issue where the Sinytra Connector mod creates a .connector folder in the mods directory, which was being incorrectly scanned as a mod subdirectory. The fix excludes the .connector folder from subdirectory scanning during mod management operations.

Changes:

  • Added logic to skip the .connector folder when scanning mod subdirectories for Forge/Quilt loaders

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

try (DirectoryStream<Path> modsDirectoryStream = Files.newDirectoryStream(getModsDirectory())) {
for (Path subitem : modsDirectoryStream) {
if (supportSubfolders && Files.isDirectory(subitem)) {
if (supportSubfolders && Files.isDirectory(subitem) && !".connector".equalsIgnoreCase(subitem.getFileName().toString())) {
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded string ".connector" should be extracted as a constant, similar to how DISABLED_EXTENSION and OLD_EXTENSION are defined at the class level (lines 382-383). This would improve maintainability and make it easier to find and update if needed. Consider defining it as:

public static final String CONNECTOR_FOLDER = ".connector";

Then use it in the condition. Note that this same folder is already referenced in ModAdviser.java line 67 in the MODPACK_BLACK_LIST, which further suggests it should be a shared constant.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant