From eedca795e1625619816da0a72088b9b135ec57cc Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 6 Jul 2012 16:55:14 +0900 Subject: [PATCH] minor fix. --- CabalDev.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CabalDev.hs b/CabalDev.hs index 926a1cf..5bc16d6 100644 --- a/CabalDev.hs +++ b/CabalDev.hs @@ -37,9 +37,10 @@ addPath orig_opts path = do searchIt :: [FilePath] -> IO FilePath searchIt [] = throwIO $ userError "Not found" searchIt path = do - a <- doesDirectoryExist (mpath path) - if a then - findConf (mpath path) + let cabalDir = mpath path + exist <- doesDirectoryExist cabalDir + if exist then + findConf cabalDir else searchIt $ init path where