Make the matching of the filename ghc.exe case insensitive, fixes bug #2603
authorNeil Mitchell <ndmitchell@gmail.com>
Tue, 16 Sep 2008 16:03:11 +0000 (16:03 +0000)
committerNeil Mitchell <ndmitchell@gmail.com>
Tue, 16 Sep 2008 16:03:11 +0000 (16:03 +0000)
compiler/main/SysTools.lhs

index 7b9ac1d..828530b 100644 (file)
@@ -844,7 +844,7 @@ getBaseDir = do let len = (2048::Int) -- plenty, PATH_MAX is 512 under Win32.
                                     return (Just (rootDir s))
   where
     rootDir s = case splitFileName $ normalise s of
-                (d, "ghc.exe") ->
+                (d, ghc_exe) | map toLower ghc_exe == "ghc.exe" ->
                     case splitFileName $ takeDirectory d of
                     -- installed ghc.exe is in $topdir/bin/ghc.exe
                     (d', "bin") -> takeDirectory d'