Changeset 1888


Ignore:
Timestamp:
3/14/2010 11:46:42 AM (5 years ago)
Author:
lowjoel
Message:

Forward port from Eraser 6.0: Fixed potential double exception when resetting the file attributes of the file when erasing cluster tips: When resetting the attributes back to the original, a second IOException may be thrown if we caught one when setting it to Normal (prior to erasure)

Location:
trunk/eraser6
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6

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

    r1881 r1888  
    222222                    continue; 
    223223 
    224                 FileAttributes fileAttr = streamInfo.Attributes; 
    225  
    226224                try 
    227225                { 
    228226                    //Reset the file attributes. 
     227                    FileAttributes fileAttr = streamInfo.Attributes; 
    229228                    streamInfo.Attributes = FileAttributes.Normal; 
    230                     EraseFileClusterTips(files[i], method); 
     229 
     230                    try 
     231                    { 
     232                        EraseFileClusterTips(files[i], method); 
     233                    } 
     234                    finally 
     235                    { 
     236                        streamInfo.Attributes = fileAttr; 
     237                    } 
    231238                } 
    232239                catch (UnauthorizedAccessException) 
     
    240247                    Logger.Log(S._("{0} did not have its cluster tips erased. The error returned " + 
    241248                        "was: {1}", files[i], e.Message), LogLevel.Error); 
    242                 } 
    243                 finally 
    244                 { 
    245                     streamInfo.Attributes = fileAttr; 
    246249                } 
    247250 
  • trunk/eraser6/Eraser.msbuild

  • trunk/eraser6/Eraser/BlackBoxMainForm.it.resx

  • trunk/eraser6/Eraser/BlackBoxUploadForm.it.resx

Note: See TracChangeset for help on using the changeset viewer.