summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2020-08-05 16:15:58 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2020-08-05 16:15:58 +0000
commitf9cf399f73042ebe4eadfcecfb449c65b21258d2 (patch)
treeef6b4a335fb01147f004e5f4f6fcdcc6099c2435 /build
parent95ef2838b419829acf8b3836671f638c748d078a (diff)
downloadapr-f9cf399f73042ebe4eadfcecfb449c65b21258d2.tar.gz
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
Diffstat (limited to 'build')
-rw-r--r--build/lineends.pl4
1 files changed, 3 insertions, 1 deletions
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;