diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 Changelog for HLint
 
+2.0.7
+    #340, fix for directory arguments in the .hlint.yaml
 2.0.6
     Do statements are not redundant if they change an operator parse
     #333, simplify labels on Parse error, makes it easier to ignore
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@
 
 **Travis:** Execute the following command:
 
-    wget https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh -O - --quiet | sh -s .
+    curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s .
 
 The arguments after `-s` are passed to `hlint`, so modify the final `.` if you want other arguments.
 
diff --git a/hlint.cabal b/hlint.cabal
--- a/hlint.cabal
+++ b/hlint.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               hlint
-version:            2.0.6
+version:            2.0.7
 license:            BSD3
 license-file:       LICENSE
 category:           Development
diff --git a/src/CmdLine.hs b/src/CmdLine.hs
--- a/src/CmdLine.hs
+++ b/src/CmdLine.hs
@@ -242,7 +242,11 @@
 x <\> y = x </> y
 
 
-resolveFile :: Cmd -> Maybe FilePath -> FilePath -> IO [FilePath]
+resolveFile
+    :: Cmd
+    -> Maybe FilePath -- ^ Temporary file
+    -> FilePath       -- ^ File to resolve, may be "-" for stdin
+    -> IO [FilePath]
 resolveFile cmd = getFile (cmdPath cmd) (cmdExtension cmd)
 
 
diff --git a/src/Config/Type.hs b/src/Config/Type.hs
--- a/src/Config/Type.hs
+++ b/src/Config/Type.hs
@@ -108,7 +108,7 @@
     = SettingClassify Classify
     | SettingMatchExp HintRule
     | SettingRestrict Restrict
-    | SettingArgument String
+    | SettingArgument String -- ^ Extra command-line argument
     | Builtin String -- use a builtin hint set
     | Infix Fixity
       deriving Show
diff --git a/src/HLint.hs b/src/HLint.hs
--- a/src/HLint.hs
+++ b/src/HLint.hs
@@ -128,12 +128,18 @@
         runHlintMain args cmd Nothing
 
 runHlintMain :: [String] -> Cmd -> Maybe FilePath -> IO [Idea]
-runHlintMain args cmd@CmdMain{..} fp = do
-  files <- concatMapM (resolveFile cmd fp) cmdFiles
-  if null files
-      then error "No files found"
-      else runHints args cmd{cmdFiles=files}
+runHlintMain args cmd tmpFile = do
+    (cmd, settings) <- readAllSettings args cmd
+    runHints args settings =<< resolveFiles cmd tmpFile
 
+resolveFiles :: Cmd -> Maybe FilePath -> IO Cmd
+resolveFiles cmd@CmdMain{..} tmpFile = do
+    files <- concatMapM (resolveFile cmd tmpFile) cmdFiles
+    if null files
+        then error "No files found"
+        else pure cmd { cmdFiles = files }
+resolveFiles cmd _ = pure cmd
+
 readAllSettings :: [String] -> Cmd -> IO (Cmd, [Setting])
 readAllSettings args1 cmd@CmdMain{..} = do
     files <- cmdHintFiles cmd
@@ -144,10 +150,8 @@
     settings3 <- return [SettingClassify $ Classify Ignore x "" "" | x <- cmdIgnore]
     return (cmd, settings1 ++ settings2 ++ settings3)
 
-
-runHints :: [String] -> Cmd -> IO [Idea]
-runHints args cmd@CmdMain{..} = do
-    (cmd@CmdMain{..}, settings) <- readAllSettings args cmd
+runHints :: [String] -> [Setting] -> Cmd -> IO [Idea]
+runHints args settings cmd@CmdMain{..} = do
     j <- if cmdThreads == 0 then getNumProcessors else return cmdThreads
     withNumCapabilities j $ do
         let outStrLn = whenNormal . putStrLn
