EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
995 stars 156 forks source link

WinSparkle 'CheckForUpdates' can accidentally be left at `0` #559

Open Athanasius opened 4 years ago

Athanasius commented 4 years ago

Utilising the "Disable Automatic Application Updates Check when in-game" option causes WinSparkle to set the CheckForUpdates registry key to 0 when you go in-game, and set it back to 1 when you leave.

This could have the unfortunate side effect of leaving a user without auto checks for updates if their EDMC crashes mid-game. Although it should get set back to 1 the next time they exit the game with EDMC running.

This also means that, if we actually gave the user the choice, we'd be over-riding how they responded to the WinSparkle question about auto-updates. However, given the code explicitly tries to set this to 1 at startup if the key wasn't yet present this seems moot.

To Reproduce Steps to reproduce the behavior:

  1. Set the "Disable Automatic Application Updates Check when in-game" option ON.
  2. Go in-game.
  3. Use RegEdit to check the key CheckForUpdates at HKEY_CURRENT_USER\Software\EDCD\EDMarketConnector\WinSparkle
  4. See that it's been changed to a 0

Expected behavior The user shouldn't be left without auto update checks on if their EDMC crashes whilst they're playing the game.

Desktop (please complete the following information):

Suggested Fix Save the current value of the WinSparkle registry key before toggling it off, and restore that value at EDMC startup. This way a user can, if they really choose to, set it to 0 manually, and we'll respect that.

C1701D commented 11 months ago

The fix itself is easy to implement, however due to the WinSparkle registry entries being located in a different location than the other config entries the actual implementation will be delayed to probably 6.0. At that point we'll also move the remaining config entries from the Marginal\EDMarketConnector folder to the EDCD\EDMarketConnector folder and add checks to ensure backwards compatibility. The reason for the delay is that this is a rather large change and while it in theory shouldn't break anything it's better to be safe than sorry.