Ignore:
Timestamp:
3/1/2010 5:54:31 AM (5 years ago)
Author:
lowjoel
Message:

Forward port from Eraser 6.0: Set the file times inside a try-catch as if the file is locked an IOException will be thrown.

Location:
trunk/eraser6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6

  • trunk/eraser6/Eraser.DefaultPlugins/FileSystems/Windows.cs

    r1847 r1863  
    7979            //detection 
    8080            info.Attributes = FileAttributes.NotContentIndexed; 
    81             info.CreationTime = info.LastWriteTime = info.LastAccessTime = MinTimestamp; 
    8281 
    8382            //Rename the file a few times to erase the entry from the file system 
     
    9089                try 
    9190                { 
     91                    //Reset the file access times: after every rename the file times may change. 
     92                    info.CreationTime = info.LastWriteTime = info.LastAccessTime = MinTimestamp; 
     93 
    9294                    //Try to rename the file. If it fails, it is probably due to another 
    9395                    //process locking the file. Defer, then rename again. 
Note: See TracChangeset for help on using the changeset viewer.