summaryrefslogtreecommitdiff
path: root/compiler/ghci
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ghci')
-rw-r--r--compiler/ghci/Linker.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index 3f4264cf48..dad13b7bbb 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -1556,7 +1556,8 @@ searchForLibUsingGcc dflags so dirs = do
l:_ -> l
if (file == so)
then return Nothing
- else return (Just file)
+ else do b <- doesFileExist file -- file could be a folder (see #16063)
+ return (if b then Just file else Nothing)
-- | Retrieve the list of search directory GCC and the System use to find
-- libraries and components. See Note [Fork/Exec Windows].