         if result
           # This is probably "undefined" error
           errors.push {
-            file: path.basename(result[1]),
+            file: path.basename(@fixFilePath(result[1])),
             row: result[2],
             col: 0,
             type: 'error',

path = null

module.exports =
class CompileErrorsView extends SelectListView
  initialize: ->
    super

    {$, $$} = require 'atom-space-pen-views'
    {CompositeDisposable} = require 'atom'

    @panel = atom.workspace.addModalPanel(item: this, visible: false)

    @disposables = new CompositeDisposable
    @workspaceElement = atom.views.getView(atom.workspace)
    @disposables.add atom.commands.add 'atom-workspace',
      'core:cancel', =>
        @hide()
      'core:close', =>
        @hide()

    @addClass 'overlay from-top'
    @prop 'id', 'spark-dev-compile-errors-view'

  # Parse gcc errors into array
  @parseErrors: (raw) ->

      result = line.match /^([^:]+):(\d+):(\d+):\s(\w+\s*\w*):(.*)$/
      if result and result[4].indexOf('error') > -1
        errors.push {
          file: @fixFilePath(result[1]),
          row: result[2],
          col: result[3],
          type: result[4],
