From d4baec9b00210368bb11260589f74492a02285b5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 8 Jun 2009 22:29:49 +0200 Subject: checklinks: Fixed "uninitialized value" warning for existing non-link destinations --- bin/checklinks | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/checklinks b/bin/checklinks index 12ababc..0b49d59 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -63,10 +63,10 @@ sub check_symlink { symlink($dst, "$base/$src"); print_format('created', $src, $dst, 'cyan'); } - elsif (readlink("$base/$src") eq $dst) { + elsif (-l "$base/$src" and readlink("$base/$src") eq $dst) { print_format('ok', $src, $dst, 'green') unless $quiet; } - elsif (readlink("$base/$src") eq "$base/$dst") { + elsif (-l "$base/$src" and readlink("$base/$src") eq "$base/$dst") { print_format('absolute', $src, $dst, 'yellow') unless $quiet; } elsif (not -l "$base/$src" and -e "$base/$src") { -- cgit v1.2.3