[DatItem] Re-add path-special sorting

This commit is contained in:
Matt Nadareski
2016-09-26 15:48:51 -07:00
parent ef5148e762
commit 3d5fb3a930

View File

@@ -5155,7 +5155,7 @@ namespace SabreTools.Helper
if (lastdir != null && thisdir != lastdir) if (lastdir != null && thisdir != lastdir)
{ {
// Output separator if needed // Output separator if needed
OutputStatsWriteMid(sw, statOutputFormat); OutputStatsWriteMidSeparator(sw, statOutputFormat);
DatFile lastdirdat = new DatFile DatFile lastdirdat = new DatFile
{ {
@@ -5225,7 +5225,7 @@ namespace SabreTools.Helper
} }
// Output the directory stats one last time // Output the directory stats one last time
OutputStatsWriteMid(sw, statOutputFormat); OutputStatsWriteMidSeparator(sw, statOutputFormat);
DatFile dirdat = new DatFile DatFile dirdat = new DatFile
{ {
@@ -5346,7 +5346,7 @@ Please check the log folder if the stats scrolled offscreen", false);
/// </summary> /// </summary>
/// <param name="sw">StreamWriter representing the output</param> /// <param name="sw">StreamWriter representing the output</param>
/// <param name="statOutputFormat">StatOutputFormat representing output format</param> /// <param name="statOutputFormat">StatOutputFormat representing output format</param>
private static void OutputStatsWriteMid(StreamWriter sw, StatOutputFormat statOutputFormat) private static void OutputStatsWriteMidSeparator(StreamWriter sw, StatOutputFormat statOutputFormat)
{ {
string mid = ""; string mid = "";
switch (statOutputFormat) switch (statOutputFormat)
@@ -5374,6 +5374,7 @@ Please check the log folder if the stats scrolled offscreen", false);
switch (statOutputFormat) switch (statOutputFormat)
{ {
case StatOutputFormat.CSV: case StatOutputFormat.CSV:
end = "\n";
break; break;
case StatOutputFormat.HTML: case StatOutputFormat.HTML:
end = @" </table> end = @" </table>
@@ -5381,8 +5382,10 @@ Please check the log folder if the stats scrolled offscreen", false);
break; break;
case StatOutputFormat.None: case StatOutputFormat.None:
default: default:
end = "\n";
break; break;
case StatOutputFormat.TSV: case StatOutputFormat.TSV:
end = "\n";
break; break;
} }
sw.Write(end); sw.Write(end);