🐛 空文件夹造成选中判断错误
This commit is contained in:
@@ -158,12 +158,13 @@
|
|||||||
End If
|
End If
|
||||||
If Directory.Exists(TargetPath) Then
|
If Directory.Exists(TargetPath) Then
|
||||||
Dim di As New DirectoryInfo(TargetPath)
|
Dim di As New DirectoryInfo(TargetPath)
|
||||||
If (Not AllowEmpty) AndAlso di.GetDirectories.Length + di.GetFiles.Length = 0 Then Return 0
|
If di.GetDirectories.Length + di.GetFiles.Length = 0 Then Return If(AllowEmpty, 2, 0)
|
||||||
'如果有一个文件不在列表,则 hasFalse = True
|
'如果有一个文件不在列表,则 hasFalse = True
|
||||||
Dim hasFalse As Boolean = False
|
Dim hasFalse As Boolean = False
|
||||||
'如果有一个文件在列表,则 hasTrue = True
|
'如果有一个文件在列表,则 hasTrue = True
|
||||||
Dim hasTrue As Boolean = False
|
Dim hasTrue As Boolean = False
|
||||||
For Each d In Directory.EnumerateDirectories(TargetPath)
|
For Each d In Directory.EnumerateDirectories(TargetPath)
|
||||||
|
If Directory.EnumerateFileSystemEntries(d).Count = 0 Then Continue For
|
||||||
Select Case IsSelected(d, True)
|
Select Case IsSelected(d, True)
|
||||||
Case 0
|
Case 0
|
||||||
hasFalse = True
|
hasFalse = True
|
||||||
|
|||||||
Reference in New Issue
Block a user