diff options
author | barry.wardell <barry.wardell@83718e91-0e4f-0410-abf4-91180603181f> | 2011-06-27 14:55:10 +0000 |
---|---|---|
committer | barry.wardell <barry.wardell@83718e91-0e4f-0410-abf4-91180603181f> | 2011-06-27 14:55:10 +0000 |
commit | b1515b29749f980228bc1f38546eac54fcd5d10a (patch) | |
tree | b12631290f10eea442b1f65469f619f96ae75b35 | |
parent | eed81c5a9f73c61d9b2504fa6c9965f1356da5a7 (diff) |
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
-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+/[^/]*$++; |