diff options
author | Bruce Momjian <bruce@momjian.us> | 2012-07-06 11:43:59 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2012-07-06 11:43:59 -0400 |
commit | 59076b2c7651c1c5f2f61d4af0e33403ccacf1df (patch) | |
tree | f8da485d6552509bd7070f886271b0410407de6a | |
parent | 06850473fb7f8ef0b8be31ec4602fcc161ad0b36 (diff) |
Fix copyright.pl to properly skip the .git directory by adding a
basename() qualification.
-rwxr-xr-x | src/tools/copyright.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl index 932f0a2854f..567c041cc58 100755 --- a/src/tools/copyright.pl +++ b/src/tools/copyright.pl @@ -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 |