fix false positive in link_types_changed

loadindex does not bother populating oldtypedlinks if there is no link
type. However, the code in link_types_changed assumed that if oldtypedlinks
is not defined, and typedlinks is, they must differ.
master
Joey Hess 2010-04-21 19:42:00 -04:00
parent 1336a3270b
commit 1a09cddd39
1 changed files with 1 additions and 1 deletions

View File

@ -526,7 +526,7 @@ sub link_types_changed ($$) {
my $old = shift; my $old = shift;
return 0 if !defined $new && !defined $old; return 0 if !defined $new && !defined $old;
return 1 if !defined $new || !defined $old; return 1 if (!defined $new && %$old) || (!defined $old && %$new);
while (my ($type, $links) = each %$new) { while (my ($type, $links) = each %$new) {
foreach my $link (keys %$links) { foreach my $link (keys %$links) {