blindpandas / bookworm

The Universally Accessible document Reader
https://getbookworm.com
Other
122 stars 38 forks source link

Remove to extension subkey when removing file association #254

Closed cary-rowen closed 4 months ago

cary-rowen commented 4 months ago

Link to issue number:

Partially resolved #247

Summary of the issue:

When Bookworm is uninstalled, users cannot create files of file types that were once associated with Bookworm.

Description of how this pull request fixes the issue:

When Bookworm associates a file type, it creates entries in the registry at the following path: HKEY_CURRENT_USER\SOFTWARE\Classes For example: HKEY_CURRENT_USER\SOFTWARE\Classes.txt The above registry key will overwrite HKEY_CLASSES_ROOT.txt When canceling the file association, Bookworm will not delete the .txt entry located under HKEY_CURRENT_USER\SOFTWARE\Classes but will delete its subkeys. This is what causes some menu items to be missing from the "New" menu.

This PR will delete the subkey to HKEY CURRENT USER\SOFTWARE\Classes on unassociation, which will also not exist on a clean OS install.

Testing performed:

Manual testing

Known issues with pull request:

As expected, the user will be asked by the operating system to select another program when opening a file originally associated with Bookworm.

mush42 commented 4 months ago

Thanks @cary-rowen awesome PR.