Ignore:
Timestamp:
11/19/08 00:29:01 (6 years ago)
Author:
lowjoel
Message:

Fixed r579. That version was a no-op.

File:
1 edited

Legend:

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

    r579 r580  
    800800            //Get the erasure method if the user specified he wants the default. 
    801801            ErasureMethod method = target.Method; 
    802              
     802 
    803803            //Calculate the total amount of data required to finish the wipe. 
    804804            dataTotal = method.CalculateEraseDataSize(paths, dataTotal); 
     
    925925 
    926926            //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) 
    928928            { 
    929929                //Rename the file. 
     
    936936                { 
    937937                    info.MoveTo(newPath); 
     938                    ++i; 
    938939                } 
    939940                catch (IOException) 
    940941                { 
    941942                    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)); 
    946949                } 
    947950            } 
Note: See TracChangeset for help on using the changeset viewer.