Changeset 2173


Ignore:
Timestamp:
6/13/2010 10:03:25 AM (4 years ago)
Author:
lowjoel
Message:

Forward-port from Eraser 6.0: Supplements r2170: some functions can be used when the drive is not mounted.

Location:
trunk/eraser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser

  • trunk/eraser/Eraser.Util/VolumeInfo.cs

    r2170 r2173  
    9292        private List<string> GetLocalVolumeMountPoints() 
    9393        { 
    94             if (!IsReady) 
    95                 throw new InvalidOperationException("The volume has not been mounted or is not " + 
    96                     "currently ready."); 
    97  
    9894            List<string> result = new List<string>(); 
    9995 
     
    410406            get 
    411407            { 
    412                 if (!IsReady) 
    413                     throw new InvalidOperationException("The volume has not been mounted or is not " + 
    414                         "currently ready."); 
    415408                return (DriveType)NativeMethods.GetDriveType(VolumeId); 
    416409            } 
     
    604597            get 
    605598            { 
    606                 if (!IsReady) 
    607                     throw new InvalidOperationException("The volume has not been mounted or is not " + 
    608                         "currently ready."); 
    609  
    610599                List<string> paths = VolumeType == DriveType.Network ? 
    611600                    GetNetworkMountPoints() : GetLocalVolumeMountPoints(); 
     
    620609        public bool IsMounted 
    621610        { 
    622             get { return IsReady && MountPoints.Count != 0; } 
     611            get { return MountPoints.Count != 0; } 
    623612        } 
    624613 
Note: See TracChangeset for help on using the changeset viewer.