swap out system.Directory.rename for Win32.File.moveFileEx for windows
This commit is contained in:
parent
9f5df9db10
commit
a40d0cbb5c
@ -1298,9 +1298,10 @@ rmGhcup = do
|
|||||||
-- we move it to temp dir, to be deleted at next reboot
|
-- we move it to temp dir, to be deleted at next reboot
|
||||||
tempDir <- liftIO $ getTemporaryDirectory
|
tempDir <- liftIO $ getTemporaryDirectory
|
||||||
tempFilepath = tempDir </> ghcupFilename
|
tempFilepath = tempDir </> ghcupFilename
|
||||||
hideError doesNotExistErrorType $ liftIO $ renameFile ghcupFilepath tempFilepath
|
liftIO $ hideError NoSuchThing $ Win32.moveFileEx ghcupFilepath (Just tempFilepath) 1
|
||||||
#else
|
#else
|
||||||
hideError doesNotExistErrorType $ liftIO $ rmFile ghcupFilepath
|
-- delete it.
|
||||||
|
hideError doesNotExistErrorType $ liftIO $ rmFile ghcupFilepath
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rmTool :: ( MonadReader AppState m
|
rmTool :: ( MonadReader AppState m
|
||||||
|
Loading…
Reference in New Issue
Block a user