Changeset 2143
- Timestamp:
- 5/16/2010 10:29:14 AM (3 years ago)
- Location:
- trunk/eraser/Eraser.DefaultPlugins/ErasureTargets
- Files:
-
- 2 edited
-
FileSystemObjectErasureTarget.cs (modified) (1 diff)
-
FolderErasureTarget.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.DefaultPlugins/ErasureTargets/FileSystemObjectErasureTarget.cs
r2114 r2143 279 279 } 280 280 281 fsManager.EraseFileSystemObject(info, method, 282 delegate(long lastWritten, long totalData, int currentPass) 283 { 284 if (Task.Canceled) 285 throw new OperationCanceledException(S._("The task was cancelled.")); 286 287 progress.Total = totalData; 288 progress.Completed += lastWritten; 289 OnProgressChanged(this, new ProgressChangedEventArgs(progress, 290 new TaskProgressChangedEventArgs(info.FullName, currentPass, method.Passes))); 291 }); 281 //Do not erase reparse points, as they will cause other references to the file 282 //to be to garbage. 283 if ((info.Attributes & FileAttributes.ReparsePoint) == 0) 284 fsManager.EraseFileSystemObject(info, method, 285 delegate(long lastWritten, long totalData, int currentPass) 286 { 287 if (Task.Canceled) 288 throw new OperationCanceledException(S._("The task was cancelled.")); 289 290 progress.Total = totalData; 291 progress.Completed += lastWritten; 292 OnProgressChanged(this, new ProgressChangedEventArgs(progress, 293 new TaskProgressChangedEventArgs(info.FullName, currentPass, method.Passes))); 294 }); 295 else 296 Logger.Log(S._("The file {0} is a reparse point and the contents of the file " + 297 "was left intact, but the file reference was erased.", LogLevel.Notice)); 292 298 293 299 //Remove the file. -
trunk/eraser/Eraser.DefaultPlugins/ErasureTargets/FolderErasureTarget.cs
r2115 r2143 109 109 foreach (FileInfo file in files) 110 110 { 111 //Check that the file exists and is not a reparse point.112 if (!file.Exists || (file.Attributes & FileAttributes.ReparsePoint) != 0)113 continue;114 115 111 //Check that the file is included 116 112 if (includePattern != null && !includePattern.Match(file.FullName).Success)
Note: See TracChangeset
for help on using the changeset viewer.
