diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-06-08 22:29:49 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-06-08 22:29:49 +0200 |
commit | d4baec9b00210368bb11260589f74492a02285b5 (patch) | |
tree | 0f06451bf8dddfab55e6079b44c91f896f93aedc /bin | |
parent | 5ece570ba9101ef7fc38dd145bd96053cb2cb21f (diff) |
checklinks: Fixed "uninitialized value" warning for existing non-link destinations
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/checklinks | 4 |
1 files 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") { |