Changeset 2644


Ignore:
Timestamp:
5/22/2012 10:49:36 AM (2 years ago)
Author:
lowjoel
Message:

When we are retrieving a set of mount points to check if the volume is mounted, we should catch FileNotFoundExceptions? which can be raised if the volume has been dismounted since we obtained the list of volumes on the system.

File:
1 edited

Legend:

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

    r2560 r2644  
    590590        public bool IsMounted 
    591591        { 
    592             get { return MountPoints.Count != 0; } 
     592            get 
     593            { 
     594                try 
     595                { 
     596                    return MountPoints.Count != 0; 
     597                } 
     598                catch (FileNotFoundException) 
     599                { 
     600                    return false; 
     601                } 
     602            } 
    593603        } 
    594604 
Note: See TracChangeset for help on using the changeset viewer.