diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-19 17:05:00 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-19 17:05:00 -0400 |
commit | 225199aff44949671b1fa848ce6d89945bd2f2f9 (patch) | |
tree | 33c549ae6881f07d23546a55a6a7156a9a5b5999 /Utility | |
parent | 46e0d4b8985dfd8dc69d684d86d8ab2b1ac44e82 (diff) | |
download | git-repair-225199aff44949671b1fa848ce6d89945bd2f2f9.tar.gz |
retrying
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Misc.hs | 5 | ||||
-rw-r--r-- | Utility/Tmp.hs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Utility/Misc.hs b/Utility/Misc.hs index a2c9c81..4b0e9a1 100644 --- a/Utility/Misc.hs +++ b/Utility/Misc.hs @@ -15,6 +15,7 @@ import Foreign import Data.Char import Data.List import Control.Applicative +import System.Exit #ifndef mingw32_HOST_OS import System.Posix.Process (getAnyProcessStatus) import Utility.Exception @@ -136,3 +137,7 @@ reapZombies = do #else reapZombies = return () #endif + +exitBool :: Bool -> IO a +exitBool False = exitFailure +exitBool True = exitSuccess diff --git a/Utility/Tmp.hs b/Utility/Tmp.hs index 186cd12..3770654 100644 --- a/Utility/Tmp.hs +++ b/Utility/Tmp.hs @@ -62,7 +62,7 @@ withTmpDirIn :: FilePath -> Template -> (FilePath -> IO a) -> IO a withTmpDirIn tmpdir template = bracket create remove where remove d = whenM (doesDirectoryExist d) $ - removeDirectoryRecursive d + return () -- removeDirectoryRecursive d create = do createDirectoryIfMissing True tmpdir makenewdir (tmpdir </> template) (0 :: Int) |