X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d4254c7f97cacffe500c3a9b6c1d887ebd3687fb..7b57bb843f2fe8b7901f7b9b10c95597527d4093:/IkiWiki/Plugin/remove.pm diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index e6f7e1dbd..b94447020 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -119,17 +119,17 @@ sub removal_confirm ($$@) { my @pages=@_; # Special case for unsaved attachments. - @pages=grep { + foreach my $page (@pages) { if (IkiWiki::Plugin::attachment->can("is_held_attachment")) { - my $f=IkiWiki::Plugin::attachment::is_held_attachment($_); + my $f=IkiWiki::Plugin::attachment::is_held_attachment($page); if (defined $f) { + print STDERR "!! remove $f\n"; require IkiWiki::Render; IkiWiki::prune($f); - 0; } } - 1; - } @pages; + } + @pages=grep { exists $pagesources{$_} } @pages; return unless @pages; foreach my $page (@pages) {