on master help sign in
Fix horrible path normalisation issue (#225)
commit5091a1d2021f89f2b4209d498144b061c1ea7e95 authorPepe Iborra <pepeiborra@gmail.com> dateSun 8 Dec 2019, 16:07 (7 years ago) parente78e163
1 file changed+4−2
exe/Main.hs+4−2
exe/Main.hs+4−2
@@ -167,9 +167,11 @@ loadSession :: FilePath -> IO (FilePath -> Action HscEnvEq)
167167loadSession dir = do
168168 cradleLoc <- memoIO $ \v -> do
169169 res <- findCradle v
170− -- Sometimes we get C: and sometimes we get c:, try and normalise that
170+ -- Sometimes we get C:, sometimes we get c:, and sometimes we get a relative path
171+ -- try and normalise that
171172 -- e.g. see https://github.com/digital-asset/ghcide/issues/126
172− return $ normalise <$> res
173+ res' <- traverse makeAbsolute res
174+ return $ normalise <$> res'
173175 session <- memoIO $ \file -> do
174176 c <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle file
175177 cradleToSession c