Changeset 1769 for branches/eraser6/CodeReview/Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs
- Timestamp:
- 02/08/10 07:29:41 (2 years ago)
- Location:
- branches/eraser6/CodeReview
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview
- Property svn:mergeinfo changed
/branches/eraser6/6.0 merged: 1744,1752,1754 /trunk/eraser6 merged: 1751-1764
- Property svn:mergeinfo changed
-
branches/eraser6/CodeReview/Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs
r1768 r1769 86 86 if (paths == null) 87 87 { 88 if (targetSize <= dataSize)88 if (targetSize <= DataSize) 89 89 amountToWrite = targetSize; 90 90 else 91 amountToWrite = dataSize * 2;91 amountToWrite = DataSize * 2; 92 92 } 93 93 else 94 amountToWrite = paths.Count * dataSize * 2;94 amountToWrite = paths.Count * DataSize * 2; 95 95 96 96 //The final amount has to be multiplied by the number of passes. … … 116 116 //If the target stream is shorter than or equal to 32kb, just forward it to 117 117 //the default function. 118 if (strm.Length < dataSize * 2)118 if (strm.Length < DataSize * 2) 119 119 { 120 120 method.Erase(strm, erasureLength, prng, callback); … … 124 124 //We need to intercept the callback function as we run the erasure method 125 125 //twice on two parts of the file. 126 long dataSize = method.CalculateEraseDataSize(null, DataSize * 2); 126 127 ErasureMethodProgressFunction customCallback = 127 128 delegate(long lastWritten, long totalData, int currentPass) 128 129 { 129 callback(lastWritten, dataSize * 2, currentPass);130 callback(lastWritten, dataSize, currentPass); 130 131 }; 131 132 … … 142 143 /// The amount of data to be erased from the header and the end of the file. 143 144 /// </summary> 144 private const long dataSize = 16 * 1024;145 private const long DataSize = 16 * 1024; 145 146 146 147 private ErasureMethod method;
Note: See TracChangeset
for help on using the changeset viewer.
