Merge pull request #12643 from atom/dg-fix-shell-menu-upgrades

Windows shell upgrade fixes #12642
This commit is contained in:
Damien Guard
2016-09-08 16:26:19 -07:00
committed by GitHub
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