Skip to content

Commit

Permalink
Fix escript:foldl/3 for beam and archive files
Browse files Browse the repository at this point in the history
escript:foldl/3 was not completely adapted to the changes introduced
in 6af2ac9.
A partial fix has already been applied by Hakan Mattson in
4ec4a06.

Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>
  • Loading branch information
Tuncer Ayaz authored and Erlang/OTP committed Feb 22, 2010
1 parent cc86585 commit e612210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/stdlib/src/escript.erl
Expand Up @@ -80,7 +80,7 @@ foldl(Fun, Acc0, File) when is_function(Fun, 4) ->
throw:Reason ->
{error, Reason}
end;
{beam, _, BeamBin, _Mode} when is_binary(BeamBin) ->
{beam, _, BeamBin, _HasRecs, _Mode} when is_binary(BeamBin) ->
GetInfo = fun() -> file:read_file_info(File) end,
GetBin = fun() -> BeamBin end,
try
Expand All @@ -89,7 +89,7 @@ foldl(Fun, Acc0, File) when is_function(Fun, 4) ->
throw:Reason ->
{error, Reason}
end;
{archive, _, ArchiveBin, _Mode} when is_binary(ArchiveBin) ->
{archive, _, ArchiveBin, _HasRecs, _Mode} when is_binary(ArchiveBin) ->
ZipFun =
fun({Name, GetInfo, GetBin}, A) ->
A2 = Fun(Name, GetInfo, GetBin, A),
Expand Down

0 comments on commit e612210

Please sign in to comment.