Ignore:
Timestamp:
12/24/2009 8:52:52 AM (4 years ago)
Author:
lowjoel
Message:

Don't enumerate the directories if the Crash Reports folder does not exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/BlackBox/Eraser.Util/BlackBox.cs

    r1426 r1427  
    265265            DirectoryInfo dirInfo = new DirectoryInfo(CrashReportsPath); 
    266266            List<BlackBoxReport> result = new List<BlackBoxReport>(); 
    267             foreach (DirectoryInfo subDir in dirInfo.GetDirectories()) 
    268                 result.Add(new BlackBoxReport(Path.Combine(CrashReportsPath, subDir.Name))); 
     267            if (dirInfo.Exists) 
     268                foreach (DirectoryInfo subDir in dirInfo.GetDirectories()) 
     269                    result.Add(new BlackBoxReport(Path.Combine(CrashReportsPath, subDir.Name))); 
    269270 
    270271            return result.ToArray(); 
Note: See TracChangeset for help on using the changeset viewer.