summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Leeds <randall@apache.org>2012-03-21 01:46:08 -0700
committerRandall Leeds <randall@apache.org>2012-03-21 01:46:08 -0700
commitbb569905aa1781beaf3403c98f4079ea06339451 (patch)
treedf6d84ba058afb0c8928efd6e7a5a0268a70d59b
parent3e5ad086c59af9819f2e93d55f10d61f949002d3 (diff)
downloadcouchdb-bb569905aa1781beaf3403c98f4079ea06339451.tar.gz
Revert "Receive the correct error message to proceed upon ignoring a file-open error"
Most of the errors here will be of the form {error, Reason} because they come from the file module. Instead of minting our own file_exists atom lets use {error, eexist}. This reverts commit 3e5ad086c59af9819f2e93d55f10d61f949002d3.
-rw-r--r--src/couchdb/couch_file.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl
index 73edde3fe..7725ddc99 100644
--- a/src/couchdb/couch_file.erl
+++ b/src/couchdb/couch_file.erl
@@ -53,14 +53,14 @@ open(Filepath, Options) ->
ignore ->
% get the error
receive
- {Ref, Pid, Reason} ->
+ {Ref, Pid, {error, Reason} = Error} ->
case process_info(self(), trap_exit) of
{trap_exit, true} -> receive {'EXIT', Pid, _} -> ok end;
{trap_exit, false} -> ok
end,
?LOG_ERROR("Error opening file ~s: ~s",
[Filepath, file:format_error(Reason)]),
- Reason
+ Error
end;
Error ->
% We can't say much here, because it could be any kind of error.