Changeset 1699


Ignore:
Timestamp:
1/27/2010 3:53:43 AM (5 years ago)
Author:
lowjoel
Message:

Fixed crash when the process which is locking the file may not be accessible to the current user, resulting in a Win32Exception. Swallow it, we'll just not list the process.

Location:
branches/eraser6/6.0/Eraser.Manager
Files:
5 edited

Legend:

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

    r1677 r1699  
    804804                        StringBuilder processStr = new StringBuilder(); 
    805805                        foreach (System.Diagnostics.Process process in processes) 
    806                             processStr.AppendFormat(System.Globalization.CultureInfo.InvariantCulture, 
    807                                 "{0}, ", process.MainModule.FileName); 
     806                        { 
     807                            try 
     808                            { 
     809                                processStr.AppendFormat(System.Globalization.CultureInfo.InvariantCulture, 
     810                                    "{0}, ", process.MainModule.FileName); 
     811                            } 
     812                            catch (System.ComponentModel.Win32Exception) 
     813                            { 
     814                            } 
     815                        } 
    808816 
    809817                        lockedBy = S._("(locked by {0})", processStr.ToString().Remove(processStr.Length - 2)); 
  • branches/eraser6/6.0/Eraser.Manager/Strings.en.resx

    r1643 r1699  
    167167  </data> 
    168168  <data name="Could not force closure of file \&quot;{0}\&quot; {1}" xml:space="preserve"> 
    169     <value>Could not force closure of file \&quot;{0}\&quot; {1}</value> 
     169    <value>Could not force closure of file \"{0}\" {1}</value> 
    170170  </data> 
    171171  <data name="Removing folders..." xml:space="preserve"> 
     
    289289    <value>Unused disk space ({0})</value> 
    290290  </data> 
    291   <data name="Could not erase {0} because {1}" xml:space="preserve"> 
    292     <value>Could not erase {0} because {1}</value> 
     291  <data name="Could not erase files and subfolders in {0} because {1}" xml:space="preserve"> 
     292    <value>Could not erase files and subfolders in {0} because {1}</value> 
    293293  </data> 
    294294  <data name="Recycle Bin" xml:space="preserve"> 
  • branches/eraser6/6.0/Eraser.Manager/Strings.it.resx

    r1643 r1699  
    289289    <value>Spazio disco inutilizzato ({0})</value> 
    290290  </data> 
    291   <data name="Could not erase {0} because {1}" xml:space="preserve"> 
    292     <value>Impossibile pulire {0} a causa di {1}</value> 
     291  <data name="Could not erase files and subfolders in {0} because {1}" xml:space="preserve"> 
     292    <value>(Untranslated)</value> 
    293293  </data> 
    294294  <data name="Recycle Bin" xml:space="preserve"> 
  • branches/eraser6/6.0/Eraser.Manager/Strings.nl.resx

    r1643 r1699  
    289289    <value>(Untranslated)</value> 
    290290  </data> 
    291   <data name="Could not erase {0} because {1}" xml:space="preserve"> 
     291  <data name="Could not erase files and subfolders in {0} because {1}" xml:space="preserve"> 
    292292    <value>(Untranslated)</value> 
    293293  </data> 
  • branches/eraser6/6.0/Eraser.Manager/Strings.resx

    r1643 r1699  
    289289    <value>Unused disk space ({0})</value> 
    290290  </data> 
    291   <data name="Could not erase {0} because {1}" xml:space="preserve"> 
    292     <value>Could not erase {0} because {1}</value> 
     291  <data name="Could not erase files and subfolders in {0} because {1}" xml:space="preserve"> 
     292    <value>Could not erase files and subfolders in {0} because {1}</value> 
    293293  </data> 
    294294  <data name="Recycle Bin" xml:space="preserve"> 
Note: See TracChangeset for help on using the changeset viewer.