Changeset 1653


Ignore:
Timestamp:
01/23/10 03:45:10 (5 years ago)
Author:
lowjoel
Message:

Fixed IOExeption when erasing files with decoy files selected and with space constraints. The decoy will only be copied as much as the original file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/6.0/Eraser.Manager/FileSystem.cs

    r1360 r1653  
    140140            } 
    141141 
    142             //Dump the copy (the first 4MB, or less, depending on the file size and available 
    143             //user space) 
    144             long amountToCopy = Math.Min(4 * 1024 * 1024, shadowFileInfo.Length); 
     142            //Dump the copy (the first 4MB, or less, depending on the file size and size of 
     143            //the original file) 
     144            long amountToCopy = Math.Min(stream.Length, 
     145                Math.Min(4 * 1024 * 1024, shadowFileInfo.Length)); 
    145146            using (FileStream shadowFileStream = shadowFileInfo.OpenRead()) 
    146147            { 
Note: See TracChangeset for help on using the changeset viewer.