cleanup_invalid_links: improve handling of scheduled actions

This commit is contained in:
Adam Spiers 2020-11-11 17:13:57 +00:00
parent 208f383580
commit c0c01a6c61

View file

@ -1027,7 +1027,14 @@ sub cleanup_invalid_links {
debug(4, 1, "Checking validity of link $node_path");
if (exists $self->{link_task_for}{$node_path}) {
die "huh? link_task_for $node_path";
my $action = $self->{link_task_for}{$node_path}{action};
if ($action ne 'remove') {
warn "Unexpected action $action scheduled for $node_path; skipping clean-up\n";
}
else {
debug(4, 2, "$node_path scheduled for removal; skipping clean-up");
}
next;
}
# Where is the link pointing?