summaryrefslogtreecommitdiff
path: root/bin/checklinks
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-06-08 22:29:49 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-06-08 22:29:49 +0200
commitd4baec9b00210368bb11260589f74492a02285b5 (patch)
tree0f06451bf8dddfab55e6079b44c91f896f93aedc /bin/checklinks
parent5ece570ba9101ef7fc38dd145bd96053cb2cb21f (diff)
checklinks: Fixed "uninitialized value" warning for existing non-link destinations
Diffstat (limited to 'bin/checklinks')
-rwxr-xr-xbin/checklinks4
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") {