Try best-guess tactic if file to be redirected doesn't exist
This commit is contained in:
parent
a0cf585939
commit
267edfebe3
@ -52,7 +52,10 @@ getCanonicalFileName :: IOish m => FilePath -> GhcModT m FilePath
|
|||||||
getCanonicalFileName fn = do
|
getCanonicalFileName fn = do
|
||||||
crdl <- cradle
|
crdl <- cradle
|
||||||
let ccfn = cradleCurrentDir crdl </> fn
|
let ccfn = cradleCurrentDir crdl </> fn
|
||||||
liftIO $ canonicalizePath ccfn
|
fex <- liftIO $ doesFileExist ccfn
|
||||||
|
if fex
|
||||||
|
then liftIO $ canonicalizePath ccfn
|
||||||
|
else return ccfn
|
||||||
|
|
||||||
unloadMappedFile :: IOish m => FilePath -> GhcModT m ()
|
unloadMappedFile :: IOish m => FilePath -> GhcModT m ()
|
||||||
unloadMappedFile = (delMMappedFile =<<) . getCanonicalFileName
|
unloadMappedFile = (delMMappedFile =<<) . getCanonicalFileName
|
||||||
|
Loading…
Reference in New Issue
Block a user