Changeset 1737


Ignore:
Timestamp:
2/3/2010 12:46:35 AM (2 years ago)
Author:
lowjoel
Message:

When listing files that need to be erased, always ensure that the file exists before querying its properties e.g. Length or Attributes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/6.0/Eraser.Manager/Task.cs

    r1677 r1737  
    633633                Regex excludePattern = new Regex(regex, RegexOptions.IgnoreCase); 
    634634                foreach (FileInfo file in files) 
    635                     if ((file.Attributes & FileAttributes.ReparsePoint) == 0 && 
     635                    if (file.Exists && 
     636                        (file.Attributes & FileAttributes.ReparsePoint) == 0 && 
    636637                        excludePattern.Matches(file.FullName).Count == 0) 
    637638                    { 
     
    644645                foreach (FileInfo file in files) 
    645646                { 
    646                     if ((file.Attributes & FileAttributes.ReparsePoint) != 0) 
     647                    if (!file.Exists || (file.Attributes & FileAttributes.ReparsePoint) != 0) 
    647648                        continue; 
    648649 
Note: See TracChangeset for help on using the changeset viewer.