summaryrefslogtreecommitdiff
path: root/Utility/Tmp/Dir.hs
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2024-03-19 19:47:48 +0800
committerSean Whitton <spwhitton@spwhitton.name>2024-03-19 19:47:48 +0800
commit4b47032686c52de5bf2324c1b1d4151c5fd6c41b (patch)
tree85098e25c0a4ad383f267fd59d591346d5e09a17 /Utility/Tmp/Dir.hs
parent34f99f9355c275917ff91539bbdac60a56ad7e17 (diff)
parent4993eab4a4507d52037ff74c67f6ca04d2401b5e (diff)
downloadgit-repair-4b47032686c52de5bf2324c1b1d4151c5fd6c41b.tar.gz
Merge tag '1.20230814'
tagging package git-repair version 1.20230814
Diffstat (limited to 'Utility/Tmp/Dir.hs')
-rw-r--r--Utility/Tmp/Dir.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Utility/Tmp/Dir.hs b/Utility/Tmp/Dir.hs
index c68ef86..904b65a 100644
--- a/Utility/Tmp/Dir.hs
+++ b/Utility/Tmp/Dir.hs
@@ -1,6 +1,6 @@
{- Temporary directories
-
- - Copyright 2010-2013 Joey Hess <id@joeyh.name>
+ - Copyright 2010-2022 Joey Hess <id@joeyh.name>
-
- License: BSD-2-clause
-}
@@ -63,8 +63,10 @@ removeTmpDir tmpdir = liftIO $ whenM (doesDirectoryExist tmpdir) $ do
-- after a process has just written to it and exited.
-- Because it's crap, presumably. So, ignore failure
-- to delete the temp directory.
- _ <- tryIO $ removeDirectoryRecursive tmpdir
+ _ <- tryIO $ go tmpdir
return ()
#else
- removeDirectoryRecursive tmpdir
+ go tmpdir
#endif
+ where
+ go = removeDirectoryRecursive