Changeset 2633


Ignore:
Timestamp:
5/22/2012 5:31:44 AM (3 years ago)
Author:
lowjoel
Message:

Backport from Eraser trunk: When erasing a file/folder, it is possible that after the erase is complete the file or containing directory was deleted by the user or another program before it can be erased. A FileNotFoundException?? or DirectoryNotFoundException?? would be raised respectively, so handle that situation by logging a warning.

Location:
branches/eraser6/6.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/6.0

  • branches/eraser6/6.0/Eraser.Manager/DirectExecutor.cs

    r2562 r2633  
    910910                    return; 
    911911                } 
     912                catch (FileNotFoundException) 
     913                { 
     914                    task.Log.LastSessionEntries.Add(new LogEntry(S._("The file {0} was not " + 
     915                        "securely erased because the file was deleted before it could be erased.", 
     916                        info.FullName), LogLevel.Warning)); 
     917                } 
     918                catch (DirectoryNotFoundException) 
     919                { 
     920                    task.Log.LastSessionEntries.Add(new LogEntry(S._("The file {0} was not " + 
     921                        "securely erased because the containing directory was deleted before " + 
     922                        "it could be erased.", info.FullName), LogLevel.Warning)); 
     923                } 
    912924                catch (FileLoadException e) 
    913925                { 
Note: See TracChangeset for help on using the changeset viewer.