Changeset 1756
- Timestamp:
- 2/8/2010 3:55:50 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser6/Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs
r1725 r1756 85 85 if (paths == null) 86 86 { 87 if (targetSize <= dataSize)87 if (targetSize <= DataSize) 88 88 amountToWrite = targetSize; 89 89 else 90 amountToWrite = dataSize * 2;90 amountToWrite = DataSize * 2; 91 91 } 92 92 else 93 amountToWrite = paths.Count * dataSize * 2;93 amountToWrite = paths.Count * DataSize * 2; 94 94 95 95 //The final amount has to be multiplied by the number of passes. … … 115 115 //If the target stream is shorter than or equal to 32kb, just forward it to 116 116 //the default function. 117 if (strm.Length < dataSize * 2)117 if (strm.Length < DataSize * 2) 118 118 { 119 119 method.Erase(strm, erasureLength, prng, callback); … … 123 123 //We need to intercept the callback function as we run the erasure method 124 124 //twice on two parts of the file. 125 long dataSize = method.CalculateEraseDataSize(null, DataSize * 2); 125 126 ErasureMethodProgressFunction customCallback = 126 127 delegate(long lastWritten, long totalData, int currentPass) 127 128 { 128 callback(lastWritten, dataSize * 2, currentPass);129 callback(lastWritten, dataSize, currentPass); 129 130 }; 130 131 … … 141 142 /// The amount of data to be erased from the header and the end of the file. 142 143 /// </summary> 143 private const long dataSize = 16 * 1024;144 private const long DataSize = 16 * 1024; 144 145 145 146 private ErasureMethod method;
Note: See TracChangeset
for help on using the changeset viewer.
