Skip to content
Snippets Groups Projects
Commit ecc92aba authored by Alain O'Dea's avatar Alain O'Dea Committed by Herbert Valerio Riedel
Browse files

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: default avatarAlain O'Dea <alain.odea@verafin.com>
Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent 4a08984a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
## 2.7.0.1
* Handle EROFS and ETXTBSY as (non-exceptional) permission denied in `fileAccess`
## 2.7.0.0 *Nov 2013*
* New `forkProcessWithUnmask` function in the style of `forkIOWithUnmask`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment