diff --git a/src/System/Process/Read.hs b/src/System/Process/Read.hs index 56630b88a1..5c76d8f87e 100644 --- a/src/System/Process/Read.hs +++ b/src/System/Process/Read.hs @@ -345,7 +345,8 @@ findExecutable eo name = liftIO $ do testFPs [] = loop dirs testFPs (fp:fps) = do exists <- D.doesFileExist fp - if exists + existsExec <- if exists then liftM D.executable $ D.getPermissions fp else return False + if existsExec then do fp' <- D.makeAbsolute fp >>= parseAbsFile return $ return fp'