mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, Style] Fix statistics output
This commit is contained in:
@@ -5687,7 +5687,11 @@ namespace SabreTools.Library.DatFiles
|
|||||||
Dictionary<StatDatFormat, StreamWriter> writers = new Dictionary<StatDatFormat, StreamWriter>();
|
Dictionary<StatDatFormat, StreamWriter> writers = new Dictionary<StatDatFormat, StreamWriter>();
|
||||||
foreach (KeyValuePair<StatDatFormat, string> kvp in outputs)
|
foreach (KeyValuePair<StatDatFormat, string> kvp in outputs)
|
||||||
{
|
{
|
||||||
writers.Add(kvp.Key, new StreamWriter(FileTools.TryOpenWrite(kvp.Value)));
|
FileStream fs = FileTools.TryCreate(kvp.Value);
|
||||||
|
if (fs != null)
|
||||||
|
{
|
||||||
|
writers.Add(kvp.Key, new StreamWriter(fs));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the header, if any
|
// Write the header, if any
|
||||||
|
|||||||
@@ -340,6 +340,12 @@ namespace SabreTools.Library.Tools
|
|||||||
Directory.CreateDirectory(outDir);
|
Directory.CreateDirectory(outDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Double check the outDir for the end delim
|
||||||
|
if (!outDir.EndsWith(Path.DirectorySeparatorChar.ToString()))
|
||||||
|
{
|
||||||
|
outDir += Path.DirectorySeparatorChar;
|
||||||
|
}
|
||||||
|
|
||||||
// For each output format, get the appropriate stream writer
|
// For each output format, get the appropriate stream writer
|
||||||
if ((statDatFormat & StatDatFormat.None) != 0)
|
if ((statDatFormat & StatDatFormat.None) != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user