diff --git a/src/AzzyBot.Core/Utilities/SoftwareStats.cs b/src/AzzyBot.Core/Utilities/SoftwareStats.cs index df7d5921..8a1bf41f 100644 --- a/src/AzzyBot.Core/Utilities/SoftwareStats.cs +++ b/src/AzzyBot.Core/Utilities/SoftwareStats.cs @@ -38,9 +38,9 @@ public static DateTimeOffset GetAppUptime() private static string GetAppFilePath() { - using Process app = Process.GetCurrentProcess(); - - string? fileName = app.MainModule?.FileName; + string fileName = Path.Combine(AppContext.BaseDirectory, AppDomain.CurrentDomain.FriendlyName); + if (!HardwareStats.CheckIfLinuxOs) + fileName += ".exe"; return (!string.IsNullOrEmpty(fileName)) ? Path.Combine(AppContext.BaseDirectory, fileName)