Mailing List Archive

inst/files.pl copy_files() filter
Hi,

Just ran into this installing a cloned install. inst/files.pl has:

sub copy_files {
my $root = shift;
my $link = shift;
my $mode = shift || 0444;
return if /\.$/;
return if /.svn/;
return if $UPGRADE and m!/data/!; # Don't upgrade data files.

which doesn't look right and causes the install to fail when after it
skips a directory that ends in a '.'. I don't think File::Find::find
even returns '.' unless you give it '.' as the path to search.

The .svn check can probably go since Bricolage doesn't use svn anymore.

Lastly, the /data/ regex should be a little more specific since you
could end up skipping any other 'data' directories you might have. I'm
guessing it's only meant to filter out bricolage/data and
bricolage/comp/data?

Adrian
Re: inst/files.pl copy_files() filter [ In reply to ]
On Mar 8, 2011, at 1:23 PM, Adrian Yee wrote:

> Hi,
>
> Just ran into this installing a cloned install. inst/files.pl has:
>
> sub copy_files {
> my $root = shift;
> my $link = shift;
> my $mode = shift || 0444;
> return if /\.$/;
> return if /.svn/;
> return if $UPGRADE and m!/data/!; # Don't upgrade data files.
>
> which doesn't look right and causes the install to fail when after it skips a directory that ends in a '.'. I don't think File::Find::find even returns '.' unless you give it '.' as the path to search.

I'm pretty sure it does. Should be changed to check /^[.]{1,2}$/.

> The .svn check can probably go since Bricolage doesn't use svn anymore.

Should be changed to /^[.]git[^.]*$/

> Lastly, the /data/ regex should be a little more specific since you could end up skipping any other 'data' directories you might have. I'm guessing it's only meant to filter out bricolage/data and bricolage/comp/data?

Yes.

Best,

David