diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/rename.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 38cebdba5..d3ca8bd3a 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -318,8 +318,14 @@ sub sessioncgi ($$) { cgi => $q, session => $session, ); - # FIXME: remove duplicates (based on src or srcfile key) - # from @torename + + # remove duplicates from @torename + my %seen=(); + my @uniq_torename; + foreach my $item (@torename) { + push(@uniq_torename, $item) unless $seen{$item->{src}}++; + } + @torename=@uniq_torename; require IkiWiki::Render; IkiWiki::disable_commit_hook() if $config{rcs}; |