Include remote paths, but skip normalization in the save/restore execution flow

This commit is contained in:
Mostafa Eweda
2015-05-18 19:03:59 -07:00
parent 564692fd30
commit d22eb697cc
4 changed files with 21 additions and 8 deletions

View File

@@ -369,7 +369,12 @@ class AtomApplication
# :windowDimensions - Object with height and width keys.
# :window - {AtomWindow} to open file paths in.
openPaths: ({pathsToOpen, pidToKillWhenClosed, newWindow, devMode, safeMode, apiPreviewMode, windowDimensions, profileStartup, window}={}) ->
pathsToOpen = (fs.normalize(pathToOpen) for pathToOpen in pathsToOpen)
pathsToOpen = pathsToOpen.map (pathToOpen) ->
if fs.existsSync(pathToOpen)
fs.normalize(pathToOpen)
else
pathToOpen
locationsToOpen = (@locationForPathToOpen(pathToOpen) for pathToOpen in pathsToOpen)
unless pidToKillWhenClosed or newWindow
@@ -517,6 +522,8 @@ class AtomApplication
new AtomWindow({bootstrapScript, @resourcePath, exitWhenDone, isSpec, specDirectory, devMode})
locationForPathToOpen: (pathToOpen) ->
{protocol} = url.parse(pathToOpen)
return {pathToOpen} if protocol?
return {pathToOpen} unless pathToOpen
return {pathToOpen} if fs.existsSync(pathToOpen)