aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-03-19 09:45:02 +0100
committerHans Bolinder <[email protected]>2013-03-19 09:45:02 +0100
commitab15d1c6ea041f1d4a8b5897f9f4ca7c4c4d86d0 (patch)
treeab2a7f0f5f64e13a4148e11bcd0b6772ad2668a5 /lib/stdlib/src
parent4ac5deb44293aa78ee53dae0e190733442a2c6c6 (diff)
parent4aca384fb03e29b4494831041de515362ed1af77 (diff)
downloadotp-ab15d1c6ea041f1d4a8b5897f9f4ca7c4c4d86d0.tar.gz
otp-ab15d1c6ea041f1d4a8b5897f9f4ca7c4c4d86d0.tar.bz2
otp-ab15d1c6ea041f1d4a8b5897f9f4ca7c4c4d86d0.zip
Merge branch 'hb/test_case_corrections' into maint
* hb/test_case_corrections: Fix a test case Fix a test case Fix a test case bug Fix a test case bug Remove ?line from dets_SUITE.erl Adjust dets.erl to cope with an evil test case Correct a disk_log testcase
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/dets.erl14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/stdlib/src/dets.erl b/lib/stdlib/src/dets.erl
index ecb509f4b5..45aef0ea80 100644
--- a/lib/stdlib/src/dets.erl
+++ b/lib/stdlib/src/dets.erl
@@ -2837,14 +2837,18 @@ fsck_try(Fd, Tab, FH, Fname, SlotNumbers, Version) ->
tempfile(Fname) ->
Tmp = lists:concat([Fname, ".TMP"]),
+ tempfile(Tmp, 10).
+
+tempfile(Tmp, 0) ->
+ Tmp;
+tempfile(Tmp, N) ->
case file:delete(Tmp) of
{error, eacces} -> % 'dets_process_died' happened anyway... (W-nd-ws)
- timer:sleep(5000),
- file:delete(Tmp);
+ timer:sleep(1000),
+ tempfile(Tmp, N-1);
_ ->
- ok
- end,
- Tmp.
+ Tmp
+ end.
%% -> {ok, NewHead} | {try_again, integer()} | Error
fsck_try_est(Head, Fd, Fname, SlotNumbers, FH) ->