Changeset 559


Ignore:
Timestamp:
11/14/2008 6:57:38 AM (3 years ago)
Author:
lowjoel
Message:

Fixed #18

Location:
branches/eraser6/Manager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/DirectExecutor.cs

    r523 r559  
    619619                try 
    620620                { 
     621                    //Skip this directory if it is a reparse point 
     622                    if ((info.Attributes & FileAttributes.ReparsePoint) != 0) 
     623                    { 
     624                        task.Log.Add(new LogEntry(string.Format(S._("Files in {0} did not have " + 
     625                            "their cluster tips erased because it is a hard link or a symbolic " + 
     626                            "link."), info.FullName), LogLevel.INFORMATION); 
     627                        return; 
     628                    } 
     629 
    621630                    foreach (FileInfo file in info.GetFiles()) 
    622                         if (Eraser.Util.File.IsProtectedSystemFile(file.FullName)) 
    623                             task.Log.Add(new LogEntry(string.Format("{0} did not have its cluster tips " + 
    624                                 "erased, because it is a system file", file.FullName), LogLevel.INFORMATION)); 
     631                        if (Util.File.IsProtectedSystemFile(file.FullName)) 
     632                            task.Log.Add(new LogEntry(string.Format("{0} did not have its " + 
     633                                "cluster tips erased, because it is a system file", file.FullName), 
     634                                LogLevel.INFORMATION)); 
     635                        else if ((file.Attributes & FileAttributes.ReparsePoint) != 0) 
     636                            task.Log.Add(new LogEntry(string.Format(S._("{0} did not have its " + 
     637                                "cluster tips erased because it is a hard link or a symbolic link."), 
     638                                file.FullName), LogLevel.INFORMATION); 
    625639                        else 
    626640                        { 
     
    807821                if ((info.Attributes & FileAttributes.Compressed) != 0 || 
    808822                    (info.Attributes & FileAttributes.Encrypted) != 0 || 
    809                     (info.Attributes & FileAttributes.SparseFile) != 0 || 
    810                     (info.Attributes & FileAttributes.ReparsePoint) != 0) 
     823                    (info.Attributes & FileAttributes.SparseFile) != 0 
    811824                { 
    812825                    //Log the error 
  • branches/eraser6/Manager/Task.cs

    r505 r559  
    368368                    Regex excludePattern = new Regex(regex, RegexOptions.IgnoreCase); 
    369369                    foreach (FileInfo file in files) 
    370                         if (excludePattern.Matches(file.FullName).Count == 0) 
     370                        if ((file.Attributes & FileAttributes.ReparsePoint) == 0 && 
     371                            excludePattern.Matches(file.FullName).Count == 0) 
    371372                        { 
    372373                            totalSize += file.Length; 
     
    378379                    foreach (FileInfo file in files) 
    379380                    { 
     381                        if ((file.Attributes & FileAttributes.ReparsePoint) != 0) 
     382                            continue; 
     383 
    380384                        totalSize += file.Length; 
    381385                        GetPathADSes(ref result, ref totalSize, file.FullName); 
Note: See TracChangeset for help on using the changeset viewer.