   if dir is parent
     findFileResults[filename] = null
     return null
-  findFile name, parent
+  if upwards
+    findFile name, parent
+  else
+    return null
 
 ###
 Tries to find a configuration file in either project directory

    indent_char: (if softTabs then " " else "\t")
    indent_with_tabs: not softTabs
  configOptions = getConfigOptionsFromSettings(languages)
  editedFilePath = editor.getPath()
  projectOptions = getConfig(editedFilePath)
  homeOptions = getConfig(getUserHome())
  if not forceEntireFile and isSelection
    text = editor.getSelectedText()
  else
    text = editor.getText()
  oldText = text
  allOptions = [
    editorOptions
    configOptions
    homeOptions
    projectOptions
  ]
  grammarName = editor.getGrammar().name
  # Finally, beautify!
  try

@param {string} name filename to search for (e.g. .jshintrc)
@param {string} dir directory to start search from (default:
current working directory)
@param {boolean} upwards should recurse upwards on failure? (default: true)

@returns {string} normalized filename
###
findFile = (name, dir, upwards=true) ->
  path ?= require("path")
  dir = dir or process.cwd()
  filename = path.normalize(path.join(dir, name))
