8000 Fix copyright.pl to properly skip the .git directory by adding a · jcsston/postgres@59076b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 59076b2

Browse files
committed
Fix copyright.pl to properly skip the .git directory by adding a
basename() qualification.
1 parent 0685047 commit 59076b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/copyright.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use warnings;
1212

1313
use File::Find;
14+
use File::Basename;
1415
use Tie::File;
1516

1617
my $pgdg = 'PostgreSQL Global Development Group';
@@ -25,15 +26,14 @@
2526

2627
sub wanted
2728
{
28-
2929
# prevent corruption of git indexes by ignoring any .git/
30-
if ($_ eq '.git')
30+
if (basename($_) eq '.git')
3131
{
3232
$File::Find::prune = 1;
3333
return;
3434
}
3535

36-
return if !-f $File::Find::name || -l $File::Find::name;
36+
return if ! -f $File::Find::name || -l $File::Find::name;
3737

3838
# skip file names with binary extensions
3939
# How are these updated? bjm 2012-01-02

0 commit comments

Comments
 (0)
0