summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_file.erl
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2011-01-07 11:43:46 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2011-01-07 11:43:46 +0000
commitc73a8da174f846e5fa401a25c47cb452f9a8bca6 (patch)
tree75b9293bcfd5c12735597095182c88b82bb98366 /src/couchdb/couch_file.erl
parentb82a37b821b6b943470fcc4476b5530cb48ef4ab (diff)
Merged revision 1056274 from trunk
More explicit and helpful file access permission errors Closes COUCHDB-966 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1056275 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_file.erl')
-rw-r--r--src/couchdb/couch_file.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl
index 56ebc4f2..7b677034 100644
--- a/src/couchdb/couch_file.erl
+++ b/src/couchdb/couch_file.erl
@@ -53,7 +53,10 @@ open(Filepath, Options) ->
{trap_exit, true} -> receive {'EXIT', Pid, _} -> ok end;
{trap_exit, false} -> ok
end,
- Error
+ case Error of
+ {error, eacces} -> {file_permission_error, Filepath};
+ _ -> Error
+ end
end;
Error ->
Error