 
   sendArgumentsToExistingProcess: (callback) ->
     client = net.connect {path: @socketPath}, (args...) =>
-      pathsToOpen = (@pathsToOpen ? []).map (pathToOpen) =>
-        path.resolve(@executedFrom, pathToOpen)
-      output = JSON.stringify({pathsToOpen})
+      output = JSON.stringify({@pathsToOpen})
       client.write(output)
       callback(true)
 

    null

  open: (pathsToOpen) ->
    pathsToOpen ?= [null]
    for pathToOpen in pathsToOpen
      pathToOpen = path.resolve(@executedFrom, pathToOpen) if @executedFrom and pathToOpen
      if existingWindow = @windowForPath(pathToOpen)
        existingWindow.focus()
        existingWindow.sendCommand('window:open-path', pathToOpen)
      else
        atomWindow = new AtomWindow
          pathToOpen: pathToOpen
          bootstrapScript: 'window-bootstrap'
          resourcePath: @resourcePath


  socketPath: '/tmp/atom.sock'

  constructor: ({@resourcePath, @executedFrom, @pathsToOpen, @testMode, @version}) ->
    if @pathsToOpen?
      @pathsToOpen = @pathsToOpen.map (pathToOpen) =>
          path.resolve(@executedFrom, pathToOpen)
    else
      @pathsToOpen = [@executedFrom] if @executedFrom

    @executedFrom ?= process.cwd()
    atomApplication = this
    @windows = []
