summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2017-12-14 10:14:53 -0500
committerFred Hebert <mononcqc@ferd.ca>2017-12-14 10:14:53 -0500
commitd0f958d59d1f87bda8d1d6c724a1af18af288324 (patch)
treeca70dd2a607da5d8c1ac4f1db1064046a62ec7c8 /src
parentb7c021b3f216bdd03d286b467889d03b142f4bf3 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_escriptize.erl3
1 files changed, 2 insertions, 1 deletions
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