[commit: directory] master: As per discussion in #2924, filter out permission errors (4f47883)
Simon Marlow
marlowsd at gmail.com
Tue Jan 17 13:38:34 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/directory
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4f47883e29822335e1dbfea7e6c66764c0cb96ff
>---------------------------------------------------------------
commit 4f47883e29822335e1dbfea7e6c66764c0cb96ff
Author: Simon Marlow <marlowsd at gmail.com>
Date: Mon Jan 16 15:03:59 2012 +0000
As per discussion in #2924, filter out permission errors
>---------------------------------------------------------------
tests/createDirectoryIfMissing001.hs | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tests/createDirectoryIfMissing001.hs b/tests/createDirectoryIfMissing001.hs
index 6f26a39..f6d2911 100644
--- a/tests/createDirectoryIfMissing001.hs
+++ b/tests/createDirectoryIfMissing001.hs
@@ -46,7 +46,9 @@ main = do
-- createDirectoryIfMissing is allowed to fail with isDoesNotExistError if
-- another process/thread removes one of the directories during the proces
-- of creating the hierarchy.
-create = tryJust (guard . isDoesNotExistError) $ createDirectoryIfMissing True testdir_a
+--
+-- It is also allowed to fail with permission errors (see #2924)
+create = tryJust (guard . (\e -> isDoesNotExistError e || isPermissionError e)) $ createDirectoryIfMissing True testdir_a
cleanup = ignore $ removeDirectoryRecursive testdir
More information about the Cvs-libraries
mailing list