From b1515b29749f980228bc1f38546eac54fcd5d10a Mon Sep 17 00:00:00 2001 From: "barry.wardell" Date: Mon, 27 Jun 2011 14:55:10 +0000 Subject: Don't create symlinks to anything other than real files. git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@205 83718e91-0e4f-0410-abf4-91180603181f --- src/util/git-add-thorn.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/git-add-thorn.pl b/src/util/git-add-thorn.pl index 275d72d..f89375b 100755 --- a/src/util/git-add-thorn.pl +++ b/src/util/git-add-thorn.pl @@ -40,6 +40,9 @@ my $dstdir = "$scratch/tmp-$thorn"; rmtree $dstdir; # ignore errors for my $file (@files) { + if (! -f "$file") { # only accept normal files. + die "ERROR: Refusing to make hard link from \"$srcdir/$file\" as it is not a regular file"; + } my $dir = $file; if ($dir =~ m+/+) { $dir =~ s+/[^/]*$++; -- cgit v1.2.3