[commit: packages/directory] master: Use getDirectoryContentsA when needed (a2e8088)

git at git.haskell.org git at git.haskell.org
Fri Dec 18 09:52:50 UTC 2015


Repository : ssh://git@git.haskell.org/directory

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a2e8088f7f603dc08bef7adbc20545fabeed51aa/directory

>---------------------------------------------------------------

commit a2e8088f7f603dc08bef7adbc20545fabeed51aa
Author: Guillaume Bouchard <guillaum.bouchard at gmail.com>
Date:   Sat Sep 26 09:25:22 2015 +0200

    Use getDirectoryContentsA when needed


>---------------------------------------------------------------

a2e8088f7f603dc08bef7adbc20545fabeed51aa
 System/Directory.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/System/Directory.hs b/System/Directory.hs
index 78a9a1d..525ac3b 100644
--- a/System/Directory.hs
+++ b/System/Directory.hs
@@ -572,8 +572,8 @@ removePathRecursive path =
 removeContentsRecursive :: FilePath -> IO ()
 removeContentsRecursive path =
   (`ioeSetLocation` "removeContentsRecursive") `modifyIOError` do
-    cont <- getDirectoryContents path
-    mapM_ removePathRecursive [path </> x | x <- cont, x /= "." && x /= ".."]
+    cont <- getDirectoryContentsA path
+    mapM_ removePathRecursive [path </> x | x <- cont]
     removeDirectory path
 
 #if __GLASGOW_HASKELL__



More information about the ghc-commits mailing list