Ignore:
Timestamp:
11/16/08 14:22:29 (6 years ago)
Author:
cjax
Message:

On RemoveFile? has a bug which potentially could have lead to infinite loop; simple but sorted now.

File:
1 edited

Legend:

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

    r560 r579  
    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; i < FilenameErasePasses; ++i) 
     927            for (int i = 0, retries = 0; i < FilenameErasePasses; ++i) 
    928928            { 
    929929                //Rename the file. 
     
    940940                { 
    941941                    Thread.Sleep(100); 
    942                     --i; 
     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; 
    943946                } 
    944947            } 
Note: See TracChangeset for help on using the changeset viewer.