diff --git a/SimConnectMSFS/WasmModuleUpdater.cs b/SimConnectMSFS/WasmModuleUpdater.cs index cd2de5417..019159282 100644 --- a/SimConnectMSFS/WasmModuleUpdater.cs +++ b/SimConnectMSFS/WasmModuleUpdater.cs @@ -155,22 +155,19 @@ public bool WasmModulesAreDifferent() string installedWASM; string mobiflightWASM; - string installedEvents; - string mobiflightEvents; if (CommunityFolder == null) return true; - - if (!File.Exists(CommunityFolder + $@"\mobiflight-event-module\modules\{WasmModuleName}")) + string wasmModulePath = Path.Combine(CommunityFolder, @"mobiflight-event-module\modules\", WasmModuleName); + if (!File.Exists(wasmModulePath)) + { return true; + } installedWASM = CalculateMD5(CommunityFolder + $@"\mobiflight-event-module\modules\{WasmModuleName}"); mobiflightWASM = CalculateMD5($@".\MSFS2020-module\mobiflight-event-module\modules\{WasmModuleName}"); - installedEvents = CalculateMD5(CommunityFolder + $@"\mobiflight-event-module\modules\{WasmEventsTxtFile}"); - mobiflightEvents = CalculateMD5($@".\MSFS2020-module\mobiflight-event-module\modules\{WasmEventsTxtFile}"); - - return (installedWASM != mobiflightWASM || installedEvents != mobiflightEvents); + return installedWASM != mobiflightWASM; } public bool InstallWasmEvents() diff --git a/UI/MainForm.cs b/UI/MainForm.cs index d15f7dee2..9b2730593 100644 --- a/UI/MainForm.cs +++ b/UI/MainForm.cs @@ -329,7 +329,7 @@ private void OnFirstStart() // MSFS2020 WasmModuleUpdater updater = new WasmModuleUpdater(); - if (updater.AutoDetectCommunityFolder()) + if (updater.AutoDetectCommunityFolder() && updater.WasmModulesAreDifferent()) { // MSFS2020 installed Msfs2020StartupForm msfsForm = new Msfs2020StartupForm();