Fix logging for file mapping when temp dir is proj. root subdir

This commit is contained in:
Nikolay Yakimov 2015-09-19 09:34:53 +03:00 committed by Daniel Gröber
parent df455a3618
commit 0d42b66fc3

View File

@ -37,7 +37,9 @@ loadMappedFile' :: IOish m => FilePath -> FilePath -> Bool -> GhcModT m ()
loadMappedFile' from to isTemp = do loadMappedFile' from to isTemp = do
cfn <- getCanonicalFileNameSafe from cfn <- getCanonicalFileNameSafe from
unloadMappedFile' cfn unloadMappedFile' cfn
addMMappedFile cfn (FileMapping to isTemp) crdl <- cradle
let to' = makeRelative (cradleRootDir crdl) to
addMMappedFile cfn (FileMapping to' isTemp)
mapFile :: (IOish m, GmState m, GhcMonad m, GmEnv m) => mapFile :: (IOish m, GmState m, GhcMonad m, GmEnv m) =>
HscEnv -> Target -> m Target HscEnv -> Target -> m Target