Skip to content

优化投影管理文件夹已存在提示 - #6664

Open
CiiLu wants to merge 4 commits into
HMCL-dev:mainfrom
CiiLu:tare/agent-solo-wood
Open

优化投影管理文件夹已存在提示#6664
CiiLu wants to merge 4 commits into
HMCL-dev:mainfrom
CiiLu:tare/agent-solo-wood

Conversation

@CiiLu

@CiiLu CiiLu commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the 10+ label Aug 12, 2026
@Glavo

Glavo commented Aug 12, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce789a1ad8

ℹ️ 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".

handler.reject(i18n("schematics.create_directory.failed", targetDir));
}
}, "", new RequiredValidator(), new Validator(i18n("schematics.create_directory.failed.invalid_name"), FileUtils::isNameValid));
}, "", new RequiredValidator(), new Validator(i18n("schematics.create_directory.failed.invalid_name"), FileUtils::isNameValid), new Validator(i18n("schematics.create_directory.failed.already_exists"), (it) -> !finalExistingFolders.contains(it)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recheck directory existence when submitting the name

The validator only checks a case-sensitive snapshot captured before the prompt opens. If another process creates the directory while the dialog is open, or on a case-insensitive filesystem the user enters different casing for an existing name, validation succeeds and Files.createDirectories(targetDir) silently accepts the already-existing directory; the dialog then resolves as though a new folder was created. Retain a live Files.exists(targetDir) check in the submission callback in addition to the interactive validator.

Useful? React with 👍 / 👎.

i18n("schematics.create_directory.prompt"),
(result, handler) -> {
Path targetDir = parent.resolve(result);
if (Files.exists(targetDir)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

为什么要删除这一处检查?

@ToobLac

ToobLac commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

这么干的意义是什么呢(

原来的检查应该能胜任判断是否存在的功能吧?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants