     finished = 0
     onFinish = (project) =>
       finished++
-      dir = atom.project.getDirectoryForProjectPath(project)
-      for buffer in modifiedBuffers when dir.contains(buffer.getPath())
+      for buffer in modifiedBuffers when path.dirname(buffer.getPath()).startsWith(project)
         scanBuffer(buffer)
 
       if projects.length

  useFirstQueryAsSearchTerm: true
  supportFilePathOnlyItemsUpdate: true
  refreshOnDidStopChanging: true
  searchInOrdered: false # This is set to true in spec to test easily

  getState: ->
    @mergeState(super, {@projects})


  search: ->
    projects = @projects.slice()
    modifiedBuffers = atom.project.getBuffers().filter (buffer) -> buffer.getPath()? and buffer.isModified()
    modifiedBuffersScanned = []

    scanBuffer = (buffer) =>
