Windows shell upgrade fixes #12642

This commit is contained in:
Damien Guard
2016-09-08 15:58:27 -07:00
parent a2d3f7d489
commit 7c48b947d7
2 changed files with 4 additions and 3 deletions

View File

@@ -144,8 +144,9 @@ exports.handleStartupEvent = (app, squirrelCommand) ->
when '--squirrel-updated'
updateShortcuts ->
addCommandsToPath ->
updateContextMenus ->
app.quit()
WinShell.fileHandler.update ->
updateContextMenus ->
app.quit()
true
when '--squirrel-uninstall'
removeShortcuts ->

View File

@@ -33,7 +33,7 @@ class ShellOption
update: (callback) =>
new Registry({hive: 'HKCU', key: "#{@key}\\#{@parts[0].key}"})
.get @parts[0].name, (err, val) =>
if err? or not val? or val.value.includes '\\' + exeName
if err? or not val?
callback(err)
else
@register callback