Skip to content

Commit

Permalink
Fix horrible path normalisation issue (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra authored and cocreature committed Dec 8, 2019
1 parent e78e163 commit 5091a1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5091a1d

Please sign in to comment.