From 30c169c79a4602d6f63cc0d6f5ba171cca8c1863 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 10 Oct 2011 15:44:34 +0200 Subject: Fix a minor bug in Dets If a Dets table had been properly closed but the space management data could not been read, it was not possible to repair the file. --- lib/stdlib/test/dets_SUITE.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/stdlib/test') diff --git a/lib/stdlib/test/dets_SUITE.erl b/lib/stdlib/test/dets_SUITE.erl index b569ed9003..b68d83b12d 100644 --- a/lib/stdlib/test/dets_SUITE.erl +++ b/lib/stdlib/test/dets_SUITE.erl @@ -1568,8 +1568,10 @@ repair(Config, V) -> ?line FileSize = dets:info(TabRef, memory), ?line ok = dets:close(TabRef), crash(Fname, FileSize+20), - ?line {error, {bad_freelists, Fname}} = + %% Used to return bad_freelists, but that changed in OTP-9622 + ?line {ok, TabRef} = dets:open_file(TabRef, [{file,Fname},{version,V}]), + ?line ok = dets:close(TabRef), ?line file:delete(Fname), %% File not closed, opening with read and read_write access tried. -- cgit v1.2.3