Permalink
Browse files

Merge pull request #1161 from dagit/patch-1

Fix path (mis)handling when scanning for modules (fixes #1160)
  • Loading branch information...
byorgey committed Dec 29, 2012
2 parents 3f72127 + 35ee2c6 commit c833d64a5bb18e3ffac80731edf087ded80b638c
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 c833d64

Please sign in to comment.