Changeset 2153


Ignore:
Timestamp:
5/16/2010 2:47:59 PM (5 years ago)
Author:
lowjoel
Message:

Fixed crash when erasing an empty file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.DefaultPlugins/ErasureTargets/FileSystemObjectErasureTarget.cs

    r2149 r2153  
    217217                ProgressManager step = new ProgressManager(); 
    218218                Progress.Steps.Add(new SteppedProgressManagerStep(step, 
    219                     paths[i].Length / (float)dataTotal, S._("Erasing files..."))); 
     219                    dataTotal == 0 ? 0.0f : paths[i].Length / (float)dataTotal, 
     220                    S._("Erasing files..."))); 
    220221                EraseStream(paths[i], step); 
    221222                step.MarkComplete(); 
Note: See TracChangeset for help on using the changeset viewer.