Skip to content
Snippets Groups Projects
Commit a40d0cbb authored by Arjun Kathuria's avatar Arjun Kathuria :rocket:
Browse files

swap out system.Directory.rename for Win32.File.moveFileEx for windows

parent 9f5df9db
No related branches found
No related tags found
1 merge request!101[WIP] Feature "nuke"
...@@ -1298,9 +1298,10 @@ rmGhcup = do ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment