Changeset 1085 for trunk/eraser6
- Timestamp:
- 6/2/2009 1:57:35 AM (4 years ago)
- Location:
- trunk/eraser6/Eraser.Manager
- Files:
-
- 6 edited
-
DirectExecutor.cs (modified) (2 diffs)
-
Eraser.Manager.csproj (modified) (2 diffs)
-
Strings.en.resx (modified) (1 diff)
-
Strings.nl.resx (modified) (1 diff)
-
Strings.resx (modified) (1 diff)
-
Task.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser6/Eraser.Manager/DirectExecutor.cs
r1082 r1085 33 33 using System.Runtime.Serialization.Formatters.Binary; 34 34 using System.Security.Permissions; 35 using Eraser.Unlocker; 35 36 36 37 namespace Eraser.Manager … … 875 876 catch (FileLoadException) 876 877 { 877 task.Log.LastSessionEntries.Add(new LogEntry(S._("The file {0} could not be " + 878 "erased because the file is currently in use.", info.FullName), 879 LogLevel.Error)); 878 List<OpenHandle> openHandles = OpenHandle.Items; 879 List<System.Diagnostics.Process> processes = new List<System.Diagnostics.Process>(); 880 foreach (OpenHandle handle in openHandles) 881 if (handle.Path == paths[i]) 882 processes.Add(System.Diagnostics.Process.GetProcessById(handle.ProcessId)); 883 884 StringBuilder processStr = new StringBuilder(); 885 foreach (System.Diagnostics.Process process in processes) 886 processStr.AppendFormat(System.Globalization.CultureInfo.InvariantCulture, 887 "{0}, ", process.MainModule.FileName); 888 889 task.Log.LastSessionEntries.Add(new LogEntry(S._( 890 "Could not force closure of file \"{0}\" (locked by {1})", 891 paths[i], processStr.ToString().Remove(processStr.Length - 2)), LogLevel.Error)); 880 892 } 881 893 finally -
trunk/eraser6/Eraser.Manager/Eraser.Manager.csproj
r1060 r1085 67 67 </ItemGroup> 68 68 <ItemGroup> 69 <ProjectReference Include="..\Eraser.Unlocker\Eraser.Unlocker.vcproj"> 70 <Project>{BCFE7D20-FC82-4BBE-BFE4-7B635D70D238}</Project> 71 <Name>Eraser.Unlocker</Name> 72 </ProjectReference> 69 73 <ProjectReference Include="..\Eraser.Util\Eraser.Util.csproj"> 70 74 <Project>{D083E1A8-3A4C-4683-9B3F-D5FEDE61B9C9}</Project> … … 100 104 --> 101 105 <PropertyGroup> 102 <PreBuildEvent>csgettext --merge EN,NL "$(ProjectDir)\" Strings 106 <PreBuildEvent>call $(SolutionDir)UpdateVersions.bat "$(SolutionDir)\" "$(SolutionDir)Version.cs.in" "$(SolutionDir)Version.cs" 107 csgettext --merge EN,NL "$(ProjectDir)\" Strings 103 108 if ERRORLEVEL 0 exit 0</PreBuildEvent> 104 109 </PropertyGroup> -
trunk/eraser6/Eraser.Manager/Strings.en.resx
r1033 r1085 178 178 <value>The file {0} could not be erased because the file's permissions prevent access to the file.</value> 179 179 </data> 180 <data name=" The file {0} could not be erased because the file is currently in use." xml:space="preserve">181 <value> The file {0} could not be erased because the file is currently in use.</value>180 <data name="Could not force closure of file \"{0}\" (locked by {1})" xml:space="preserve"> 181 <value>Could not force closure of file \"{0}\" (locked by {1})</value> 182 182 </data> 183 183 <data name="Removing folders..." xml:space="preserve"> -
trunk/eraser6/Eraser.Manager/Strings.nl.resx
r1033 r1085 178 178 <value>(Untranslated)</value> 179 179 </data> 180 <data name=" The file {0} could not be erased because the file is currently in use." xml:space="preserve">180 <data name="Could not force closure of file \"{0}\" (locked by {1})" xml:space="preserve"> 181 181 <value>(Untranslated)</value> 182 182 </data> -
trunk/eraser6/Eraser.Manager/Strings.resx
r1033 r1085 178 178 <value>The file {0} could not be erased because the file's permissions prevent access to the file.</value> 179 179 </data> 180 <data name=" The file {0} could not be erased because the file is currently in use." xml:space="preserve">181 <value> The file {0} could not be erased because the file is currently in use.</value>180 <data name="Could not force closure of file \"{0}\" (locked by {1})" xml:space="preserve"> 181 <value>Could not force closure of file \"{0}\" (locked by {1})</value> 182 182 </data> 183 183 <data name="Removing folders..." xml:space="preserve"> -
trunk/eraser6/Eraser.Manager/Task.cs
r1082 r1085 29 29 using Eraser.Util; 30 30 using System.Security.Permissions; 31 using Eraser.Unlocker; 31 32 32 33 namespace Eraser.Manager … … 352 353 } 353 354 } 354 catch (IOException e) 355 { 356 //The system cannot open the file, assume no ADSes for lack of 357 //more information. 358 Task.Log.LastSessionEntries.Add(new LogEntry(e.Message, LogLevel.Error)); 355 catch (FileLoadException) 356 { 357 //The system cannot open the file, try to force the file handle to close. 358 List<OpenHandle> openHandles = OpenHandle.Items; 359 foreach (OpenHandle handle in openHandles) 360 if (handle.Path == file && handle.Close()) 361 { 362 GetPathADSes(list, out totalSize, file); 363 return; 364 } 359 365 } 360 366 catch (UnauthorizedAccessException e)
Note: See TracChangeset
for help on using the changeset viewer.
