Fix opening log files from notification not presenting the correct file

This commit is contained in:
Susko3 2023-12-18 21:11:00 +01:00
parent 8e8d9b2cd9
commit cc800a18b2
1 changed files with 2 additions and 2 deletions

View File

@ -1190,7 +1190,7 @@ private void forwardGeneralLogsToNotifications()
}
else if (recentLogCount == short_term_display_limit)
{
string logFile = $@"{entry.Target.Value.ToString().ToLowerInvariant()}.log";
string logFile = Logger.GetLogger(entry.Target.Value).Filename;
Schedule(() => Notifications.Post(new SimpleNotification
{
@ -1198,7 +1198,7 @@ private void forwardGeneralLogsToNotifications()
Text = NotificationsStrings.SubsequentMessagesLogged,
Activated = () =>
{
Storage.GetStorageForDirectory(@"logs").PresentFileExternally(logFile);
Logger.Storage.PresentFileExternally(logFile);
return true;
}
}));