Changeset 321 for trunk/Include


Ignore:
Timestamp:
Sep 2, 2007, 9:27:58 AM (17 years ago)
Author:
OverTaker
Message:

FindClose()し忘れていたの修整

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/IO/DirectoryInfo.ab

    r318 r321  
    9595        If searchOption = SearchOption.TopDirectoryOnly Then
    9696            Return GetDirectories(searchPattern)
    97         Else
     97        ElseIf searchOption = SearchOption.AllDirectories Then
    9898            Dim dirs As List<DirectoryInfo>
    9999            dirs = GetDirectories(searchPattern)
    100             Dim i As Long
    101100
     101            Dim subdirs As List<DirectoryInfo>
     102            Dim i As Long, j As Long
     103            For i = 0 To ELM(dirs.Count)
     104                subdirs = dirs[i].GetDirectories(searchPattern)
     105                For j = 0 To ELM(subdirs.Count)
     106                    dirs.Add(subdirs[i])
     107                Next
     108            Next
     109            Return dirs
    102110        End If
    103111    End Function*/
     
    153161                lastError = GetLastError()
    154162                If lastError <> ERROR_NO_MORE_FILES Then
     163                    FindClose(find)
    155164                    debug 'Exception
    156165                    Return Nothing
     
    159168            i++
    160169        Wend
     170        FindClose(find)
    161171        Return files
    162172    End Function
Note: See TracChangeset for help on using the changeset viewer.