zocker-160 / keyboard-center

Application for mapping macro keys on Logitech keyboards
GNU General Public License v3.0
66 stars 3 forks source link

Fix crash when attempting to back up nonexistent config file #68

Closed aurtzy closed 3 weeks ago

aurtzy commented 3 weeks ago

Hello!

I encountered an issue running keyboard-center v2 for the first time where it would crash. This appears to be due to the config file not yet existing, so when an attempt is made to backup the file before doing any saving, the program raises a FileNotFoundError.

This adds an try-catch for FileNotFoundError and only attempts to re-save the backup config if it's available.

zocker-160 commented 3 weeks ago

Uhh yeah this is a fk stupid bug, but it needs to be fixed with a separate save function for config file init.

Cannot believe I missed this. I will fix it tomorrow.