🐛 Fix Windows context menu shortcut

Fix the bug where Open With Atom on Windows machines will fail for paths
containing spaces. Wraps quotes around the path to the Atom executable
in the reg key string.
This commit is contained in:
Jeremy Ebneyamin
2015-10-02 00:01:06 -07:00
parent 5a4f79c505
commit 5b522f70c2

View File

@@ -67,9 +67,9 @@ installContextMenu = (callback) ->
installMenu = (keyPath, arg, callback) ->
args = [keyPath, '/ve', '/d', 'Open with Atom']
addToRegistry args, ->
args = [keyPath, '/v', 'Icon', '/d', process.execPath]
args = [keyPath, '/v', 'Icon', '/d', "\"#{process.execPath}\""]
addToRegistry args, ->
args = ["#{keyPath}\\command", '/ve', '/d', "#{process.execPath} \"#{arg}\""]
args = ["#{keyPath}\\command", '/ve', '/d', "\"#{process.execPath}\" \"#{arg}\""]
addToRegistry(args, callback)
installMenu fileKeyPath, '%1', ->