1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +03:00

Fix copyright.pl to properly skip the .git directory by adding a

basename() qualification.
This commit is contained in:
Bruce Momjian
2012-07-06 11:43:59 -04:00
parent 06850473fb
commit 59076b2c76

View File

@ -11,6 +11,7 @@ use strict;
use warnings;
use File::Find;
use File::Basename;
use Tie::File;
my $pgdg = 'PostgreSQL Global Development Group';
@ -25,15 +26,14 @@ find({ wanted => \&wanted, no_chdir => 1 }, '.');
sub wanted
{
# prevent corruption of git indexes by ignoring any .git/
if ($_ eq '.git')
if (basename($_) eq '.git')
{
$File::Find::prune = 1;
return;
}
return if !-f $File::Find::name || -l $File::Find::name;
return if ! -f $File::Find::name || -l $File::Find::name;
# skip file names with binary extensions
# How are these updated? bjm 2012-01-02