From f9cf399f73042ebe4eadfcecfb449c65b21258d2 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Wed, 5 Aug 2020 16:15:58 +0000 Subject: Avoid traversing .git or .svn trees, avoid correcting non-file entities (e.g. links) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1880610 13f79535-47bb-0310-9956-ffa450edef68 --- build/lineends.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/lineends.pl b/build/lineends.pl index 8aa735cc8..bdbaa76b9 100644 --- a/build/lineends.pl +++ b/build/lineends.pl @@ -14,6 +14,7 @@ use IO::File; use File::Find; +use Fcntl ':mode'; # The ignore list is '-' seperated, with this leading hyphen and # trailing hyphens in ever concatinated list below. @@ -102,8 +103,9 @@ sub totxt { } } } - return if ($File::Find::dir =~ m|^(.+/)?.svn(/.+)?$|); + return if ($File::Find::dir =~ m|^(.+/)?(\.svn\|\.git)(/.+)?$|); @ostat = stat($oname); + return if (!S_ISREG($ostat[2])); $srcfl = new IO::File $oname, "r" or die; $dstfl = new IO::File $tname, "w" or die; binmode $srcfl; -- cgit v1.2.1