    Win32.deleteFile path
  #else
    Posix.removeLink path
-@@ -679,6 +768,10 @@
+@@ -679,6 +767,10 @@
  
  renameDirectory :: FilePath -> FilePath -> IO ()
  renameDirectory opath npath =

    where checkNotDir path = do
            dirType <- getDirectoryType path
                       `catchIOError` \ _ -> return NotDirectory
@@ -928,7 +1027,9 @@
 copyFileWithMetadata src dst =
   (`ioeAddLocation` "copyFileWithMetadata") `modifyIOError` doCopy
   where

     Win32.sHGetFolderPath nullPtr Win32.cSIDL_PERSONAL nullPtr 0
 #else
     getEnv "HOME"
@@ -1934,7 +2077,9 @@
 -}
 getTemporaryDirectory :: IO FilePath
 getTemporaryDirectory =
