diff options
-rwxr-xr-x | src/util/git-add-thorn.pl | 3 |
1 files changed, 3 insertions, 0 deletions
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+/[^/]*$++; |