[commit: packages/unix] master, safe710fixes, safe710fixes-again, safefixes710again: Unify accepted errno flags for access (5c5484c)
git at git.haskell.org
git at git.haskell.org
Thu Mar 19 15:50:03 UTC 2015
Repository : ssh://git@git.haskell.org/unix
On branches: master,safe710fixes,safe710fixes-again,safefixes710again
Link : http://ghc.haskell.org/trac/ghc/changeset/5c5484c8006f3df63d4cfb640f947f6391ea192f/unix
>---------------------------------------------------------------
commit 5c5484c8006f3df63d4cfb640f947f6391ea192f
Author: Clemens Lang <neverpanic at gmail.com>
Date: Sun Sep 21 17:45:56 2014 +0200
Unify accepted errno flags for access
The ByteString variant of the access function didn't accept the same
flags as the non-ByteString one, but it makes sense that the OS doesn't
care about which one is being used and returns all error codes for both
variants.
>---------------------------------------------------------------
5c5484c8006f3df63d4cfb640f947f6391ea192f
System/Posix/Files/ByteString.hsc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/System/Posix/Files/ByteString.hsc b/System/Posix/Files/ByteString.hsc
index 9430779..1b346a7 100644
--- a/System/Posix/Files/ByteString.hsc
+++ b/System/Posix/Files/ByteString.hsc
@@ -158,7 +158,7 @@ access name flags =
if (r == 0)
then return True
else do err <- getErrno
- if (err == eACCES)
+ if (err == eACCES || err == eROFS || err == eTXTBSY)
then return False
else throwErrnoPath "fileAccess" name
More information about the ghc-commits
mailing list