Created
February 6, 2014 02:42
-
-
Save AlainODea/8837579 to your computer and use it in GitHub Desktop.
Patch for defect in System.Posix.fileAccess on a read-only file system.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5c5ea6bb96522a42634c9e803f387a617c70238e Mon Sep 17 00:00:00 2001 | |
From: Alain O'Dea <[email protected]> | |
Date: Wed, 5 Feb 2014 21:24:28 +0000 | |
Subject: [PATCH] BUGFIX: Handle eROFS as permission denied | |
--- | |
System/Posix/Files.hsc | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/System/Posix/Files.hsc b/System/Posix/Files.hsc | |
index 57f771e..b79b725 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) | |
then return False | |
else throwErrnoPath "fileAccess" name | |
-- | |
1.8.3.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment