From dc7124a9ee8c755f682a547624b0d4432cbc90f6 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sat, 7 Sep 2013 02:11:45 +0200 Subject: [PATCH] use absolute path for list of checked dependencies to avoid circular refs. this helps when throwing rcb at random stuff from the webs. --- rcb.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcb.pl b/rcb.pl index 0c4caea..4e63351 100755 --- a/rcb.pl +++ b/rcb.pl @@ -105,7 +105,7 @@ sub scandep_doit { my $nf = $i . $delim . $na; my $np = dirname($nf); my $nb = basename($nf); - if(!defined($hdep{$nf})) { + if(!defined($hdep{abs_path($nf)})) { if(-e $nf) { scanfile($np, $nb); return; @@ -188,7 +188,7 @@ sub scanfile { my $tf = ""; my $skipinclude = 0; - $hdep{$self} = 1; + $hdep{abs_path($self)} = 1; open($fp, "<", $self) or die "could not open file $self: $!"; while(<$fp>) { my $line = $_; -- 2.11.4.GIT