[project @ 2003-08-20 15:11:06 by simonmar]
authorsimonmar <unknown>
Wed, 20 Aug 2003 15:11:06 +0000 (15:11 +0000)
committersimonmar <unknown>
Wed, 20 Aug 2003 15:11:06 +0000 (15:11 +0000)
After removing temp files, reset the list of temporary files to empty.

ghc/compiler/main/SysTools.lhs

index 6c9f2a5..2e5d8de 100644 (file)
@@ -651,8 +651,10 @@ setTmpDir dir = writeIORef v_TmpDir (canonicalise dir)
 #endif
 
 cleanTempFiles :: Int -> IO ()
-cleanTempFiles verb = do fs <- readIORef v_FilesToClean
-                        removeTmpFiles verb fs
+cleanTempFiles verb
+   = do fs <- readIORef v_FilesToClean
+       removeTmpFiles verb fs
+       writeIORef v_FilesToClean []
 
 cleanTempFilesExcept :: Int -> [FilePath] -> IO ()
 cleanTempFilesExcept verb dont_delete