From d0f958d59d1f87bda8d1d6c724a1af18af288324 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 14 Dec 2017 10:14:53 -0500 Subject: Fix escriptize failure when ebin/ has subdirs Although fairly irregular, the presence of a subdirectory in ebin/ while running rebar3 escriptize would crash the run and generate a dump. Since ebin subdirectories are generally not supported (adding a path for an application only adds ebin/ and no subdirectories to the VM's path set), we just silently ignore the directory altogether. Fixes #1693 --- src/rebar_prv_escriptize.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rebar_prv_escriptize.erl') diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl index 1da70f8..3d6e708 100644 --- a/src/rebar_prv_escriptize.erl +++ b/src/rebar_prv_escriptize.erl @@ -194,7 +194,8 @@ load_files(Wildcard, Dir) -> load_files(Prefix, Wildcard, Dir) -> [read_file(Prefix, Filename, Dir) - || Filename <- filelib:wildcard(Wildcard, Dir)]. + || Filename <- filelib:wildcard(Wildcard, Dir), + not filelib:is_dir(filename:join(Dir, Filename))]. read_file(Prefix, Filename, Dir) -> Filename1 = case Prefix of -- cgit v1.1