Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(BtnDisplayRename_Click):在重命名前检查路径 #5773

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shimoranla
Copy link
Collaborator

Resolve #5304

@LTCatt LTCatt added 处理中 开发者正在调查或处理该项 · Bug 🟨 中 优先度:中 labels Mar 3, 2025
@shimoranla shimoranla marked this pull request as draft March 4, 2025 03:50
@shimoranla shimoranla changed the title fix(ModValidate):未检查路径是否存在 fix(BtnDisplayRename_Click):在重命名前检查路径 Mar 4, 2025
@shimoranla shimoranla marked this pull request as ready for review March 4, 2025 04:04
@shimoranla
Copy link
Collaborator Author

没有 Review 的坏处:写错了也没人提醒下我.jpg (玩笑,无恶意)

@LTCatt
Copy link
Member

LTCatt commented Mar 16, 2025

image
umm 这个验证器应该已经会做这个检查了啊,真是这个地方的问题么?感觉像是其他地方的 bug……

@LTCatt LTCatt added 等待提交者 需要提交者补充信息或进行操作 and removed 处理中 开发者正在调查或处理该项 labels Mar 16, 2025
@shimoranla
Copy link
Collaborator Author

如果预先输入好,然后去资源管理器建一个目录,再切回去不会有重复提示,因为文本压根就没变过也不会触发检查,这个时候确认重命名就能复现这个 Bug

@Open-KFC

This comment was marked as outdated.

@Open-KFC
Copy link

Open-KFC commented Mar 17, 2025

在弹窗的实现里写点确定按钮之后再给文本输入框 Validate 一下(

不然这没法确定弹窗获取到的输入一定有效,在别的地方用也有可能出 bug ,对吧(

Edit: 这个应该放在 MyConverter.IsExited 后面

屏幕截图 2025-03-17 082933

@shimoranla
Copy link
Collaborator Author

shimoranla commented Mar 17, 2025

前面的输入检查应该能过滤掉无效的输入吧?

我中午再看看怎么写比较好

@Open-KFC
Copy link

Open-KFC commented Mar 17, 2025

现在造成这个 bug 的原因就是只在用户输入内容发生改变时才会 TextArea.Validate() ,这设计就导致了 Validate 类不能做成“在外界发生改变时判断结果有可能改变”的样子,否则就有可能将实际上通不过检查的内容返回出去。在返回结果之前也进行一次有效性判断就能解决这个问题。

@shimoranla
Copy link
Collaborator Author

shimoranla commented Mar 17, 2025

中午再说.jpg
现在在学校上课.jpg

不要相信用户输入
@shimoranla shimoranla requested a review from LTCatt March 17, 2025 04:02
@shimoranla shimoranla added 等待确认 已经过社区确认,等待开发者确认 and removed 等待提交者 需要提交者补充信息或进行操作 labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
· Bug 等待确认 已经过社区确认,等待开发者确认 🟨 中 优先度:中
Projects
None yet
Development

Successfully merging this pull request may close these issues.

重命名开始时未完全验证可行性
3 participants