diff options
author | Alain O'Dea <alain.odea@verafin.com> | 2014-02-05 21:24:28 +0000 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-02-06 12:15:22 +0100 |
commit | ecc92abad017cf12d8eb83509d4d57ae14ad47f9 (patch) | |
tree | b90e9ffd6388295f20616e8aac35b66fdf9a815b /System | |
parent | 4a08984afe5390d91f10f9b1caf7365e6a93595b (diff) |
Handle EROFS/ETXTBSY as permission denied in `fileAccess` (re #8741)
This extends `System.Posix.Files.`access` to map EROFS & ETXTBSY to
mean permission denied just like EACCESS.
Based on a patch by Alain O'Dea and comments by Duncan Coutts
Authored-by: Alain O'Dea <alain.odea@verafin.com>
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'System')
-rw-r--r-- | System/Posix/Files.hsc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/System/Posix/Files.hsc b/System/Posix/Files.hsc index 57f771e..704ef8a 100644 --- a/System/Posix/Files.hsc +++ b/System/Posix/Files.hsc @@ -151,7 +151,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 |