Address comments + add tests

This commit is contained in:
Mostafa Eweda
2015-05-19 17:10:45 -07:00
parent 506dbfd098
commit c3552c95bc
4 changed files with 20 additions and 4 deletions

View File

@@ -522,9 +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 url.parse(pathToOpen).protocol?
return {pathToOpen} if fs.existsSync(pathToOpen)
pathToOpen = pathToOpen.replace(/[:\s]+$/, '')

View File

@@ -24,9 +24,9 @@ class DefaultDirectoryProvider
# TODO: Stop normalizing the path in pathwatcher's Directory.
directory = new Directory(directoryPath)
if (url.parse(directoryPath).protocol)
if url.parse(directoryPath).protocol
directory.path = directoryPath
if (fs.isCaseInsensitive())
if fs.isCaseInsensitive()
directory.lowerCasePath = directoryPath.toLowerCase()
directory