diff options
author | Joey Hess <joeyh@joeyh.name> | 2022-05-04 11:40:38 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2022-05-04 11:43:20 -0400 |
commit | c244daa32328f478bbf38a79f2fcacb138a1049f (patch) | |
tree | f1b2691357b88b267b9a77d5db23213bf0e2ac79 /Utility/Tmp | |
parent | 3c9630388ab0234df9e13473ac20c147e77074c5 (diff) | |
download | git-repair-c244daa32328f478bbf38a79f2fcacb138a1049f.tar.gz |
merge from git-annex
Diffstat (limited to 'Utility/Tmp')
-rw-r--r-- | Utility/Tmp/Dir.hs | 8 |
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 |