minor fix.

This commit is contained in:
Kazu Yamamoto 2012-07-06 16:55:14 +09:00
parent 8fbdfac52b
commit eedca795e1
1 changed files with 4 additions and 3 deletions

View File

@ -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