mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Address comments + add tests
This commit is contained in:
@@ -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]+$/, '')
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user