     @flowPath = @findFlowInPath()
 
     @flowEnabled = true
-    @flowEnabled &= atom.project.path and fs.existsSync(atom.project.path)
-    @flowEnabled &= fs.existsSync(path.join(atom.project.path, '.flowconfig'))
+    @flowEnabled &= atom.project.getPath() and fs.existsSync(atom.project.getPath())
+    @flowEnabled &= fs.existsSync(path.join(atom.project.getPath(), '.flowconfig'))
     @flowEnabled &= @flowPath?
 
     unless @flowEnabled


            last = _.last(msg.message)
            unless msg.message.length < 2
              toPush.descr += "(#{last.path.replace(atom.project.path, '.')}:#{last.line})"

            console.log "Message: #{toPush.message}"
            realMessages.push(toPush)


    @flowPath = path.join(@flowPath, 'flow')

    flowServer = spawn(@flowPath, ['start', '--all', '--module', 'node', path.resolve(atom.project.getPath())])
    flowServer.on 'close', (code) => @flowEnabled &= (code is 2)

  destroy: ->
    spawn(@flowPath, ['--stop', path.resolve(atom.project.getPath())])
    console.log "die"

module.exports = LinterFlow
