aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-01-13 09:57:25 +0100
committerHans Bolinder <[email protected]>2016-01-13 09:57:25 +0100
commitba8092e372b324bc5053ed5bd4ec1ad4b4b737bf (patch)
treee4e8f3dfbb67645ae510448b1b21106cb897312f /lib/stdlib/src
parentd230f885454acbc1492f42d0f190b9d5c8eb98ec (diff)
parentf31ae20fbb2af0eeb9c87cfa1243abafbe7773cd (diff)
downloadotp-ba8092e372b324bc5053ed5bd4ec1ad4b4b737bf.tar.gz
otp-ba8092e372b324bc5053ed5bd4ec1ad4b4b737bf.tar.bz2
otp-ba8092e372b324bc5053ed5bd4ec1ad4b4b737bf.zip
Merge branch 'hb/stdlib/fix_dets_file_name/OTP-13229'
* hb/stdlib/fix_dets_file_name/OTP-13229: stdlib: Let dets:open_file() crash when given raw file name
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/dets.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/stdlib/src/dets.erl b/lib/stdlib/src/dets.erl
index 6d07f4018a..7036316242 100644
--- a/lib/stdlib/src/dets.erl
+++ b/lib/stdlib/src/dets.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -1124,7 +1124,9 @@ repl({delayed_write, {Delay,Size} = C}, Defs)
Defs#open_args{delayed_write = C};
repl({estimated_no_objects, I}, Defs) ->
repl({min_no_slots, I}, Defs);
-repl({file, File}, Defs) ->
+repl({file, File}, Defs) when is_list(File) ->
+ Defs#open_args{file = File};
+repl({file, File}, Defs) when is_atom(File) ->
Defs#open_args{file = to_list(File)};
repl({keypos, P}, Defs) when is_integer(P), P > 0 ->
Defs#open_args{keypos =P};