diff options
Diffstat (limited to 'Utility/Tmp/Dir.hs')
-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 |