Make sure zip module is loaded

Before we check for zip:foldl/3 make sure zip module is loaded.
This commit is contained in:
Tuncer Ayaz 2010-03-11 01:27:46 +01:00
parent 62a2788e8b
commit faf21694fe

View file

@ -116,6 +116,7 @@ abort(String, Args) ->
%% this function when the time is right. escript:foldl/3 was an
%% undocumented exported fun and is going to be removed post-R13B04.
escript_foldl(Fun, Acc, File) ->
{module, zip} = code:ensure_loaded(zip),
case erlang:function_exported(zip, foldl, 3) of
true ->
emulate_escript_foldl(Fun, Acc, File);