mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-12 02:24:13 +03:00
Fix horrible path normalisation issue (#225)
This commit is contained in:
parent
e78e1638ea
commit
5091a1d202
@ -167,9 +167,11 @@ loadSession :: FilePath -> IO (FilePath -> Action HscEnvEq)
|
|||||||
loadSession dir = do
|
loadSession dir = do
|
||||||
cradleLoc <- memoIO $ \v -> do
|
cradleLoc <- memoIO $ \v -> do
|
||||||
res <- findCradle v
|
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
|
-- 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
|
session <- memoIO $ \file -> do
|
||||||
c <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle file
|
c <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle file
|
||||||
cradleToSession c
|
cradleToSession c
|
||||||
|
Loading…
Reference in New Issue
Block a user