diff --git a/System/IO/Temp.hs b/System/IO/Temp.hs
--- a/System/IO/Temp.hs
+++ b/System/IO/Temp.hs
@@ -1,5 +1,6 @@
 module System.IO.Temp (
-    module System.IO.Temp,
+    withSystemTempFile, withSystemTempDirectory,
+    withTempFile, withTempDirectory,
     module Distribution.Compat.TempFile
   ) where
 
@@ -53,7 +54,7 @@
 withTempFile tmpDir template action =
   Exception.bracket
     (openTempFile tmpDir template)
-    (\(name, handle) -> hClose handle >> removeFile name)
+    (\(name, handle) -> hClose handle >> ignoringIOErrors (removeFile name))
     (uncurry action)
 
 -- | Create and use a temporary directory.
@@ -72,4 +73,7 @@
 withTempDirectory targetDir template =
   Exception.bracket
     (createTempDirectory targetDir template)
-    (removeDirectoryRecursive)
+    (ignoringIOErrors . removeDirectoryRecursive)
+
+ignoringIOErrors :: IO () -> IO ()
+ignoringIOErrors ioe = ioe `Exception.catch` (\e -> const (return ()) (e :: IOError))
diff --git a/temporary.cabal b/temporary.cabal
--- a/temporary.cabal
+++ b/temporary.cabal
@@ -1,5 +1,5 @@
 name:                temporary
-version:             1.1.1
+version:             1.1.2
 cabal-version:       >= 1.6
 synopsis:            Portable temporary file and directory support for Windows and Unix, based on code from Cabal
 description:         The functions for creating temporary files and directories in the base library are quite limited. The unixutils
