Skip to content

Commit

Permalink
Fix log files splitting mid-zone hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
valarnin committed Jun 23, 2021
1 parent b901b94 commit 9dfcfc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FFXIV_Log_Splitter/FFXIV_Log_Splitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
var line = logInfo.originalLogLine;
var parts = line.Split('|');
var et = uint.Parse(parts[0]);
if (et == 1)
if (et == 1 && !parts[3].Equals(zone))
{
file.Close();
if (encCount < 1)
Expand Down Expand Up @@ -76,7 +76,7 @@ private string getFilename(string zone, DateTime dateTime)
var logFolder = Path.GetDirectoryName(ActGlobals.oFormActMain.LogFilePath);
var name = dateTime.ToString("yyyy-MM-ddTHH\\_mm\\_ss.fffffffzzz") + "_" + zone;
name = string.Join("_", name.Split(Path.GetInvalidFileNameChars(), StringSplitOptions.RemoveEmptyEntries)).TrimEnd('.');
return logFolder + Path.DirectorySeparatorChar + "Zone_" + name + ".log";
return logFolder + Path.DirectorySeparatorChar + "Zone_" + name + ".zonelog";
}
}
}

0 comments on commit 9dfcfc9

Please sign in to comment.