From 8f623db0920738267fd74e4d62a3faeee66ed5be Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 18 Nov 2014 15:15:14 -0800 Subject: [PATCH] Add path argument to context menu commands --- src/browser/squirrel-update.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/browser/squirrel-update.coffee b/src/browser/squirrel-update.coffee index c1e19b210..b1d3c2408 100644 --- a/src/browser/squirrel-update.coffee +++ b/src/browser/squirrel-update.coffee @@ -58,17 +58,17 @@ installContextMenu = (callback) -> args.push('/f') spawnReg(args, callback) - installMenu = (keyPath, callback) -> + installMenu = (keyPath, arg, callback) -> args = [keyPath, '/ve', '/d', 'Open with Atom'] addToRegistry args, -> args = [keyPath, '/v', 'Icon', '/d', process.execPath] addToRegistry args, -> - args = ["#{keyPath}\\command", '/ve', '/d', process.execPath] + args = ["#{keyPath}\\command", '/ve', '/d', "#{process.execPath} \"#{arg}\""] addToRegistry(args, callback) - installMenu fileKeyPath, -> - installMenu directoryKeyPath, -> - installMenu(backgroundKeyPath, callback) + installMenu fileKeyPath, '%1' -> + installMenu directoryKeyPath, '%1', -> + installMenu(backgroundKeyPath, '%V', callback) # Get the user's PATH environment variable registry value. getPath = (callback) ->