Rename pathToOpen load setting to initialPath

Use the initialPath as the window state serialization key.

Also use the parent directory as the intitial path when the
path to open is a file.
This commit is contained in:
Corey Johnson & Kevin Sawicki
2013-06-11 15:38:04 -07:00
parent fc52ee518e
commit a4ee1eb785
3 changed files with 23 additions and 21 deletions

View File

@@ -113,12 +113,12 @@ window.deserializeEditorWindow = ->
Project = require 'project'
Git = require 'git'
pathToOpen = atom.getPathToOpen()
{initialPath} = atom.getLoadSettings()
windowState = atom.getWindowState()
atom.packageStates = windowState.packageStates ? {}
window.project = new Project(pathToOpen)
window.project = new Project(initialPath)
window.rootView = deserialize(windowState.rootView) ? new RootView
$(rootViewParentSelector).append(rootView)