BlueManCZ / SIF

:video_game: Steam Icons Fixer - Fix runtime icons of Steam games on Linux.
Apache License 2.0
46 stars 3 forks source link

Wrong Key names in ~/.local/share/Steam/config/config.vdf #42

Open djsigmann opened 1 month ago

djsigmann commented 1 month ago

I'm on arch, and use regular steam, I installed sif from the AUR.

Running the script, I get the following error message:

Traceback (most recent call last):
  File "/usr/sbin/sif", line 579, in <module>
    in steam_config_file["InstallConfigStore"]["Software"]["Valve"]["Steam"]
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'Valve'

Upon further inspection, ~/.local/share/Steam/config/config.vdf has the following structure: InstallConfigStore > Software > valve > steam In other words, the 'Valve' and 'Steam' keys should not have the first letter capitalized.

Since there are no issues regarding this, I assume that not all users have their config.vdf structured like this and the best course of action would probably be to check for 'Valve' and 'Steam' first, then fall back to 'valve' and 'steam'.

Let me know if I can submit a PR.

BlueManCZ commented 5 days ago

Hello, thank you for reporting this. Did the latest commit solve this problem for you?