Subject: | ttree - accept directive ignores copy directive when used in config file |
Running ttree -a -f on a config file with the following directives:
src = /var/www/htdocs/Website/input/ # input
dest = /var/www/htdocs/Website/output/ #output
copy = (gif|png|jpg|jpeg|pdf|js)$
accept = \.content$
With 2 .content files in $src, along with several images and javascript in $src/root/static/ causes only the 2 .content files to be processed along with the directory structure, but not the copy files. Removing the accept directive works as expected, copying the files and directory structure.
This looks like it's caused by the if block in process_tree on line 299 of ttree 2.90.
next FILE is called if the accept regex array is true, so unless($copy_file) on line 386 inside process_file is never reached.