Changeset 580
- Timestamp:
- 11/19/2008 12:29:01 AM (5 years ago)
- File:
-
- 1 edited
-
branches/eraser6/Manager/DirectExecutor.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Manager/DirectExecutor.cs
r579 r580 800 800 //Get the erasure method if the user specified he wants the default. 801 801 ErasureMethod method = target.Method; 802 802 803 803 //Calculate the total amount of data required to finish the wipe. 804 804 dataTotal = method.CalculateEraseDataSize(paths, dataTotal); … … 925 925 926 926 //Rename the file a few times to erase the record from the MFT. 927 for (int i = 0, retries = 0; i < FilenameErasePasses; ++i)927 for (int i = 0, tries = 0; i < FilenameErasePasses; ++tries) 928 928 { 929 929 //Rename the file. … … 936 936 { 937 937 info.MoveTo(newPath); 938 ++i; 938 939 } 939 940 catch (IOException) 940 941 { 941 942 Thread.Sleep(100); 942 // if we have been waiting for more than 3.2 seconds 943 // we should just ignore this, we probably could not access 944 // it in near future 945 if (retries < 32) --i; 943 944 //If after 20 tries the file is still locked, some program is definitely 945 //using the file; throw an exception. 946 if (tries > 20) 947 throw new IOException(string.Format(S._("The file {0} is currently in use " + 948 "and cannot be removed."), info.FullName)); 946 949 } 947 950 }
Note: See TracChangeset
for help on using the changeset viewer.
