erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

rlx_prv_assembler:copy_dir -- always copy recursively #770

Closed al-khanji closed 4 years ago

al-khanji commented 4 years ago

It is very possible for e.g. priv to have subdirs of its own.

tsloughter commented 4 years ago

Where are you getting this issue? priv dir does commonly have sub-directories which has worked, you have an app that when included in a release is not copying the sub-dirs?

al-khanji commented 4 years ago

If I use exclude_modules functionality I get a backtrace that points to this line. The root cause is in rlx_prv_assembler:copy_directory/5 and rlx_prv_assember:copy_directory/5, which pass module exclusions for all directories, which leads the code to always select the version of rlx_prv_assembler:copy_dir/3 that I patched above. I can provide a test case if required to illustrate the point.

tsloughter commented 4 years ago

Yes, a test is needed to guard against regressions.

al-khanji commented 4 years ago

I updated the existing test case to cover this edge case. If you remove the recursive option and run this case manually you will get a crash.