Changeset 441 for trunk/Include/Classes


Ignore:
Timestamp:
Feb 28, 2008, 10:52:52 PM (17 years ago)
Author:
OverTaker
Message:

ファイルの閉じ忘れ修整。例外メッセージのミス修整。

File:
1 edited

Legend:

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

    r407 r441  
    245245    Virtual Sub Delete()
    246246        If DeleteFile(ToTCStr(FullPath)) = FALSE Then
    247             Throw New IOException("DriveInfo.Delete: Failed to DeleteFile.")
     247            Throw New IOException("FileSystemInfo.Delete: Failed to DeleteFile.")
    248248        End If
    249249    End Sub
     
    265265            m_IsFreshed = True
    266266        Else
    267             Throw New IOException("DriveInfo.Refresh: Failed to FindFirstFile.")
     267            Throw New IOException("FileSystemInfo.Refresh: Failed to FindFirstFile.")
    268268        End If
    269269    End Sub
     
    283283        Dim hFile = CreateFile(ToTCStr(FullPath), GENERIC_WRITE, FILE_SHARE_READ Or FILE_SHARE_WRITE, ByVal 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)
    284284        If hFile = INVALID_HANDLE_VALUE Then
    285             Throw New IOException("DriveInfo.setFileTime: Failed to CreateFile.")
     285            Throw New IOException("FileSystemInfo.setFileTime: Failed to CreateFile.")
    286286            Exit Function
    287287        End If
    288288
    289289        If SetFileTime(hFile, m_CreationTime, m_LastAccessTime, m_LastWriteTime) = False Then
    290             Throw New IOException("DriveInfo.setFileTime: Failed to SetFileTime.")
     290            CloseHandle(hFile)
     291            Throw New IOException("FileSystemInfo.setFileTime: Failed to SetFileTime.")
    291292        End If
    292293
Note: See TracChangeset for help on using the changeset viewer.