summaryrefslogtreecommitdiff
path: root/Utility/Path.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Path.hs')
-rw-r--r--Utility/Path.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs
index 8c78409b8..216b2401d 100644
--- a/Utility/Path.hs
+++ b/Utility/Path.hs
@@ -181,7 +181,12 @@ searchPath command
| otherwise = getSearchPath >>= getM indir
where
indir d = check $ d </> command
- check f = ifM (doesFileExist f) ( return (Just f), return Nothing )
+ check f = firstM doesFileExist
+#ifdef __WINDOWS__
+ [f, f ++ ".exe"]
+#else
+ [f]
+#endif
{- Checks if a filename is a unix dotfile. All files inside dotdirs
- count as dotfiles. -}