Permalink
Browse files

Fix path (mis)handling when scanning for modules

  • Loading branch information...
1 parent 3f72127 commit 35ee2c698278329f14f70e5146916fc3fff50b10 @dagit committed Dec 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cabal-install/Distribution/Client/Init/Heuristics.hs
@@ -98,7 +98,7 @@ scanForModulesIn projectRoot srcRoot = scan srcRoot []
scanRecursive parent hierarchy entry
| isUpper (head entry) = scan (parent </> entry) (entry : hierarchy)
| isLower (head entry) && not (ignoreDir entry) =
- scanForModulesIn projectRoot $ foldl (</>) srcRoot (entry : hierarchy)
+ scanForModulesIn projectRoot $ foldl (</>) srcRoot (reverse (entry : hierarchy))
| otherwise = return []
ignoreDir ('.':_) = True
ignoreDir dir = dir `elem` ["dist", "_darcs"]

0 comments on commit 35ee2c6

Please sign in to comment.