aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2014-10-30 14:49:14 +0100
committerMarcus Arendt <[email protected]>2014-10-30 14:49:14 +0100
commit6d231981c8750f842996d3db8f9b2972ce63bc12 (patch)
tree884a5d0fde922fe0fb575e70ee072cdf65cf7a71 /lib/kernel/src
parent5828c116eaec0086e4b3ad297b30150c5d542c9f (diff)
parent146b82a241a1940de62b47123bfcab322df69759 (diff)
downloadotp-6d231981c8750f842996d3db8f9b2972ce63bc12.tar.gz
otp-6d231981c8750f842996d3db8f9b2972ce63bc12.tar.bz2
otp-6d231981c8750f842996d3db8f9b2972ce63bc12.zip
Merge branch 'nox/rm-raw_files/OTP-12276'
* nox/rm-raw_files/OTP-12276: Remove untested option 'raw_files' from file module
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/file.erl24
1 files changed, 9 insertions, 15 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index ee2fb85de2..7b2750846e 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -423,21 +423,15 @@ open(Item, ModeList) when is_list(ModeList) ->
case lists:member(raw, ModeList) of
%% Raw file, use ?PRIM_FILE to handle this file
true ->
- %% check if raw file mode is disabled
- case catch application:get_env(kernel, raw_files) of
- {ok,false} ->
- open(Item, lists:delete(raw, ModeList));
- _ -> % undefined | {ok,true}
- Args = [file_name(Item) | ModeList],
- case check_args(Args) of
- ok ->
- [FileName | _] = Args,
- %% We rely on the returned Handle (in {ok, Handle})
- %% being a pid() or a #file_descriptor{}
- ?PRIM_FILE:open(FileName, ModeList);
- Error ->
- Error
- end
+ Args = [file_name(Item) | ModeList],
+ case check_args(Args) of
+ ok ->
+ [FileName | _] = Args,
+ %% We rely on the returned Handle (in {ok, Handle})
+ %% being a pid() or a #file_descriptor{}
+ ?PRIM_FILE:open(FileName, ModeList);
+ Error ->
+ Error
end;
false ->
case lists:member(ram, ModeList) of