Changeset 894
- Timestamp:
- 4/27/2009 12:46:42 PM (4 years ago)
- Location:
- branches/eraser6/Manager
- Files:
-
- 4 edited
-
DirectExecutor.cs (modified) (3 diffs)
-
Strings.en.resx (modified) (1 diff)
-
Strings.nl.resx (modified) (2 diffs)
-
Strings.resx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Manager/DirectExecutor.cs
r893 r894 1026 1026 task.OnProgressChanged(progress.Event); 1027 1027 1028 //Make sure the file does not have any attributes which may affect 1029 //the erasure process 1028 1029 //Remove the read-only flag, if it is set. 1030 StreamInfo info = new StreamInfo(paths[i]); 1030 1031 bool isReadOnly = false; 1031 StreamInfo info = new StreamInfo(paths[i]);1032 if ((info.Attributes & FileAttributes.Compressed) != 0 ||1033 (info.Attributes & FileAttributes.Encrypted) != 0 ||1034 (info.Attributes & FileAttributes.SparseFile) != 0)1035 {1036 //Log the error1037 //TODO: This would leave files after the list unerased. Log this as an error instead1038 throw new ArgumentException(S._("Compressed, encrypted, or sparse" +1039 "files cannot be erased with Eraser."));1040 }1041 1042 //Remove the read-only flag, if it is set.1043 1032 if (isReadOnly = info.IsReadOnly) 1044 1033 info.IsReadOnly = false; … … 1046 1035 try 1047 1036 { 1037 //Make sure the file does not have any attributes which may affect 1038 //the erasure process 1039 if ((info.Attributes & FileAttributes.Compressed) != 0 || 1040 (info.Attributes & FileAttributes.Encrypted) != 0 || 1041 (info.Attributes & FileAttributes.SparseFile) != 0) 1042 { 1043 //Log the error 1044 task.Log.Add(new LogEntry(S._("The file {0} could not be erased " + 1045 "because the file was either compressed, encrypted or a sparse file.", 1046 info.FullName), LogLevel.ERROR)); 1047 } 1048 1048 1049 //Create the file stream, and call the erasure method to write to 1049 1050 //the stream. … … 1099 1100 LogLevel.ERROR)); 1100 1101 } 1102 catch (FileLoadException) 1103 { 1104 task.Log.Add(new LogEntry(S._("The file {0} could not be erased because the " + 1105 "file is currently in use.", info.FullName), LogLevel.ERROR)); 1106 } 1101 1107 finally 1102 1108 { -
branches/eraser6/Manager/Strings.en.resx
r808 r894 175 175 <value>Could not erase old file system entries: Unsupported File system</value> 176 176 </data> 177 <data name=" Compressed, encrypted, or sparsefiles cannot be erased with Eraser." xml:space="preserve">178 <value> Compressed, encrypted, or sparsefiles cannot be erased with Eraser.</value>177 <data name="The file {0} could not be erased because the file was either compressed, encrypted or a sparse file." xml:space="preserve"> 178 <value>The file {0} could not be erased because the file was either compressed, encrypted or a sparse file.</value> 179 179 </data> 180 180 <data name="The file {0} could not be erased because the file's permissions prevent access to the file." xml:space="preserve"> 181 181 <value>The file {0} could not be erased because the file's permissions prevent access to the file.</value> 182 182 </data> 183 <data name="The file {0} could not be erased because the file is currently in use." xml:space="preserve"> 184 <value>The file {0} could not be erased because the file is currently in use.</value> 185 </data> 183 186 <data name="The file {0} is currently in use and cannot be removed." xml:space="preserve"> 184 187 <value>The file {0} is currently in use and cannot be removed.</value> -
branches/eraser6/Manager/Strings.nl.resx
r808 r894 175 175 <value>(Untranslated)</value> 176 176 </data> 177 <data name=" Compressed, encrypted, or sparsefiles cannot be erased with Eraser." xml:space="preserve">177 <data name="The file {0} could not be erased because the file was either compressed, encrypted or a sparse file." xml:space="preserve"> 178 178 <value>(Untranslated)</value> 179 179 </data> … … 181 181 <value>(Untranslated)</value> 182 182 </data> 183 <data name="The file {0} could not be erased because the file is currently in use." xml:space="preserve"> 184 <value>(Untranslated)</value> 185 </data> 183 186 <data name="The file {0} is currently in use and cannot be removed." xml:space="preserve"> 184 187 <value>(Untranslated)</value> -
branches/eraser6/Manager/Strings.resx
r808 r894 175 175 <value>Could not erase old file system entries: Unsupported File system</value> 176 176 </data> 177 <data name=" Compressed, encrypted, or sparsefiles cannot be erased with Eraser." xml:space="preserve">178 <value> Compressed, encrypted, or sparsefiles cannot be erased with Eraser.</value>177 <data name="The file {0} could not be erased because the file was either compressed, encrypted or a sparse file." xml:space="preserve"> 178 <value>The file {0} could not be erased because the file was either compressed, encrypted or a sparse file.</value> 179 179 </data> 180 180 <data name="The file {0} could not be erased because the file's permissions prevent access to the file." xml:space="preserve"> 181 181 <value>The file {0} could not be erased because the file's permissions prevent access to the file.</value> 182 182 </data> 183 <data name="The file {0} could not be erased because the file is currently in use." xml:space="preserve"> 184 <value>The file {0} could not be erased because the file is currently in use.</value> 185 </data> 183 186 <data name="The file {0} is currently in use and cannot be removed." xml:space="preserve"> 184 187 <value>The file {0} is currently in use and cannot be removed.</value>
Note: See TracChangeset
for help on using the changeset viewer.
