Changeset 1838


Ignore:
Timestamp:
2/12/2010 12:51:18 PM (2 years ago)
Author:
lowjoel
Message:

No need to check that a valid handle is returned, OpenHandle? will throw an exception if it can't open the handle to the volume.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6/Eraser.Util/VolumeInfo.cs

    r1837 r1838  
    679679            get 
    680680            { 
    681                 using (SafeFileHandle handle = OpenHandle(0x80u, 
    682                     FileShare.ReadWrite, FileOptions.None)) 
    683                 { 
    684                     //Check that the handle is valid 
    685                     if (handle.IsInvalid) 
    686                         throw Win32ErrorCode.GetExceptionForWin32Error(Marshal.GetLastWin32Error()); 
    687  
     681                using (SafeFileHandle handle = OpenHandle(0x80u, FileShare.ReadWrite, 
     682                    FileOptions.None)) 
     683                { 
    688684                    //This only works if the user has turned on the disk performance 
    689685                    //counters with 'diskperf -y'. These counters are off by default 
Note: See TracChangeset for help on using the changeset viewer.