Adds using 'rmFile' fn in rmGhcupDirs, it has better windows handling logic
This commit is contained in:
parent
33eaa765d7
commit
3fae516ce4
@ -1314,7 +1314,8 @@ rmTool ListResult {lVer, lTool, lCross} = do
|
|||||||
rmGhcupDirs :: ( MonadReader AppState m
|
rmGhcupDirs :: ( MonadReader AppState m
|
||||||
, MonadIO m
|
, MonadIO m
|
||||||
, MonadLogger m
|
, MonadLogger m
|
||||||
, MonadCatch m )
|
, MonadCatch m
|
||||||
|
, MonadMask m )
|
||||||
=> m ()
|
=> m ()
|
||||||
rmGhcupDirs = do
|
rmGhcupDirs = do
|
||||||
dirs@Dirs
|
dirs@Dirs
|
||||||
@ -1365,7 +1366,7 @@ rmGhcupDirs = do
|
|||||||
removeDirIfEmpty logsDir
|
removeDirIfEmpty logsDir
|
||||||
|
|
||||||
deleteFile filepath = do
|
deleteFile filepath = do
|
||||||
hideError InappropriateType $ liftIO $ removeFile filepath
|
hideError InappropriateType $ rmFile filepath
|
||||||
|
|
||||||
removeDirIfEmpty filepath =
|
removeDirIfEmpty filepath =
|
||||||
hideError UnsatisfiedConstraints $ liftIO $ removeDirectory filepath
|
hideError UnsatisfiedConstraints $ liftIO $ removeDirectory filepath
|
||||||
|
Loading…
Reference in New Issue
Block a user