aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2015-06-08 12:51:56 +0200
committerHenrik Nord <[email protected]>2015-06-08 12:52:10 +0200
commitad3086562c81f52b4daf194f702c42ea2f677762 (patch)
tree222cc68e7f1c09fa530a4c5c96bd7046a05b49c1
parent9f592aae079452fa1ee43afcdba0c8cccf254cfb (diff)
parent7a2da8a21c947503591b19c9ec2a262b7b2fb581 (diff)
downloadotp-ad3086562c81f52b4daf194f702c42ea2f677762.tar.gz
otp-ad3086562c81f52b4daf194f702c42ea2f677762.tar.bz2
otp-ad3086562c81f52b4daf194f702c42ea2f677762.zip
Merge branch 'mikpe/mnesia-openlog-emfile'
* mikpe/mnesia-openlog-emfile: mnesia: don't delete log file on emfile error OTP-12807
-rw-r--r--lib/mnesia/src/mnesia_log.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mnesia/src/mnesia_log.erl b/lib/mnesia/src/mnesia_log.erl
index 21ad0ffdb6..8620949dc0 100644
--- a/lib/mnesia/src/mnesia_log.erl
+++ b/lib/mnesia/src/mnesia_log.erl
@@ -349,6 +349,8 @@ open_log(Name, Header, Fname, Exists, Repair, Mode) ->
mnesia_lib:important("Data may be missing, log ~p repaired: Lost ~p bytes~n",
[Fname, BadBytes]),
Log;
+ {error, Reason = {file_error, _Fname, emfile}} ->
+ fatal("Cannot open log file ~p: ~p~n", [Fname, Reason]);
{error, Reason} when Repair == true ->
file:delete(Fname),
mnesia_lib:important("Data may be missing, Corrupt logfile deleted: ~p, ~p ~n",