fix(ModValidate):未检查路径是否存在

This commit is contained in:
薄奚梦灵 authored and GitHub committed 2025-03-03 16:30:02 +08:00
1 parent 503244a0de
commit 40e0afefdd
1 file changed
+2
@@ -216,6 +216,8 @@ Public Class ValidateFolderName
End Sub
Public Overrides Function Validate(Str As String) As String
Try
'检查是否已存在
If Not Str = "" AndAlso Directory.Exists($"{Path}\{Str}") Then Return "指定的名称已存在"
'检查是否为空
Dim LengthCheck As String = New ValidateNullOrWhiteSpace().Validate(Str)
If Not LengthCheck = "" Then Return LengthCheck