-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure that default file/protocol handlers are re-installed after updating. #997
Conversation
Also, it seems weird that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state.js
should only be used from the renderer process. Migrations also run in the renderer process.
I like the idea of reinstalling handlers on every app update though!
Only caveat is that someone might get frustrated if they remove handlers via Control Panel / System Preferences and they keep coming back
// enabled them. | ||
function installHandlers (saved) { | ||
if (saved.prefs.isFileHandler) { | ||
const handlers = require('../../main/handlers') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can do this from the renderer process.
You have to use ipcRenderer
to tell the main process to reinstall the handlers.
@dcposch I believe that currently |
You're right. |
5dc18f9
to
0c83259
Compare
0c83259
to
39145b2
Compare
Any updates? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Previously, they were only installed when the preference was changed. This caused the handlers to point to non-existing files after updates occurred and older versions were removed by Squirrel.
Closes #791, #911.