Skip to content

Commit 9070044

Browse files
pepeiborracocreature
authored andcommitted
Fix horrible path normalisation issue (haskell/ghcide#225)
1 parent ba199f5 commit 9070044

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ghcide/exe/Main.hs

+4-2
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ loadSession :: FilePath -> IO (FilePath -> Action HscEnvEq)
167167
loadSession 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

0 commit comments

Comments
 (0)