Normalize resource path in AtomWindow constructor

This commit is contained in:
Kevin Sawicki
2014-06-04 08:44:58 -07:00
parent 196729e6d2
commit 7c4a32fffa
2 changed files with 5 additions and 3 deletions

View File

@@ -21,6 +21,10 @@ class AtomWindow
constructor: (settings={}) ->
{@resourcePath, pathToOpen, initialLine, initialColumn, @isSpec, @exitWhenDone} = settings
# Normalize to make sure drive letter case is consistent on Windows
@resourcePath = path.normalize(@resourcePath) if @resourcePath
global.atomApplication.addWindow(this)
@browserWindow = new BrowserWindow show: false, title: 'Atom', icon: @constructor.iconPath
@@ -29,6 +33,7 @@ class AtomWindow
loadSettings = _.extend({}, settings)
loadSettings.windowState ?= '{}'
loadSettings.appVersion = app.getVersion()
loadSettings.resourcePath = @resourcePath
# Only send to the first non-spec window created
if @constructor.includeShellLoadTime and not @isSpec

View File

@@ -109,9 +109,6 @@ parseCommandLine = ->
catch
resourcePath = path.dirname(path.dirname(__dirname))
# Normalize to make sure drive letter case is consistent on Windows
resourcePath = path.normalize(resourcePath) if resourcePath
{resourcePath, pathsToOpen, executedFrom, test, version, pidToKillWhenClosed, devMode, safeMode, newWindow, specDirectory, logFile}
start()