From 5091a1d2021f89f2b4209d498144b061c1ea7e95 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 8 Dec 2019 16:07:15 +0000 Subject: [PATCH] Fix horrible path normalisation issue (#225) --- exe/Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exe/Main.hs b/exe/Main.hs index 5c343467..6313d646 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -167,9 +167,11 @@ loadSession :: FilePath -> IO (FilePath -> Action HscEnvEq) loadSession dir = do cradleLoc <- memoIO $ \v -> do res <- findCradle v - -- Sometimes we get C: and sometimes we get c:, try and normalise that + -- Sometimes we get C:, sometimes we get c:, and sometimes we get a relative path + -- try and normalise that -- e.g. see https://github.com/digital-asset/ghcide/issues/126 - return $ normalise <$> res + res' <- traverse makeAbsolute res + return $ normalise <$> res' session <- memoIO $ \file -> do c <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle file cradleToSession c