aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-06-15 17:46:08 -0400
committerJoey Hess <joey@kitenet.net>2011-06-15 17:46:08 -0400
commit00c0677588920832bad40d10f7d0fee5312fb115 (patch)
tree9bf969e7756c5225219cf73095b862fc1f7fa14c /IkiWiki/Plugin
parentb66261d08bb978a1c5b1fe02ef25b49b4cd9d9e6 (diff)
downloadikiwiki-00c0677588920832bad40d10f7d0fee5312fb115.tar
ikiwiki-00c0677588920832bad40d10f7d0fee5312fb115.tar.gz
fix removal of staged attachments
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/remove.pm10
1 files changed, 5 insertions, 5 deletions
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) {