Changeset 598


Ignore:
Timestamp:
11/19/2008 10:01:14 AM (6 years ago)
Author:
lowjoel
Message:

Do not assume that the list of volumes enumerated will all be mounted: unmounted drives will now be ignored when listing the drives eligible for unused space erasures.

Location:
branches/eraser6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/TaskDataSelectionForm.cs

    r493 r598  
    6464                    driveType != DriveType.Network) 
    6565                { 
     66                    //Skip drives which are not mounted: we cannot erase their unused space. 
     67                    if (volume.MountPoints.Count == 0) 
     68                        continue; 
     69 
    6670                    DriveItem item = new DriveItem(); 
    6771                    string volumePath = volume.IsMounted ? 
  • branches/eraser6/Util/VolumeInfo.cs

    r507 r598  
    7979                if (pathNames[i] == '\0') 
    8080                { 
     81                    //If there are no mount points for this volume, the string will only 
     82                    //have one NULL 
     83                    if (i - lastIndex == 0) 
     84                        break; 
     85 
    8186                    mountPoints.Add(pathNames.Substring(lastIndex, i - lastIndex)); 
    8287 
Note: See TracChangeset for help on using the changeset viewer.