From f8eee18d78e78d3c3172ba28b18f5efe77b96a9a Mon Sep 17 00:00:00 2001 From: Xjph Date: Tue, 15 Mar 2022 12:15:18 -0230 Subject: [PATCH] Widen journal file filters for Odyssey Update 11 --- ObservatoryCore/LogMonitor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ObservatoryCore/LogMonitor.cs b/ObservatoryCore/LogMonitor.cs index 4bf1b6b..f962d05 100644 --- a/ObservatoryCore/LogMonitor.cs +++ b/ObservatoryCore/LogMonitor.cs @@ -98,7 +98,7 @@ namespace Observatory SetLogMonitorState(currentState | LogMonitorState.Batch); DirectoryInfo logDirectory = GetJournalFolder(path); - var files = logDirectory.GetFiles("Journal.????????????.??.log"); + var files = logDirectory.GetFiles("Journal.*.??.log"); var readErrors = new List<(Exception ex, string file, string line)>(); foreach (var file in files) { @@ -117,8 +117,8 @@ namespace Observatory SetLogMonitorState(currentState | LogMonitorState.PreRead); DirectoryInfo logDirectory = GetJournalFolder(Properties.Core.Default.JournalFolder); - var files = logDirectory.GetFiles("Journal.????????????.??.log"); - + var files = logDirectory.GetFiles("Journal.*.??.log"); + // Read at most the last two files (in case we were launched after the game and the latest // journal is mostly empty) but keeping only the lines since the last FSDJump. List lastSystemLines = new(); @@ -214,7 +214,7 @@ namespace Observatory { DirectoryInfo logDirectory = GetJournalFolder(path); - journalWatcher = new FileSystemWatcher(logDirectory.FullName, "Journal.????????????.??.log") + journalWatcher = new FileSystemWatcher(logDirectory.FullName, "Journal.*.??.log") { NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.FileName | NotifyFilters.CreationTime