From 91a408ec77036252894e5c31012124e4770f9333 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Feb 2011 13:56:05 -0400 Subject: minor optimisation Assume the aggregated content is only going to be in one of the directories, and so stop if it's successfully removed from the transientdir. --- IkiWiki/Plugin/aggregate.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 7d4565342..419b40fdb 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -390,8 +390,8 @@ sub garbage_collect () { # any guid whose feed is gone should be removed if (! exists $feeds{$guid->{feed}}) { if (exists $guid->{page}) { - unlink "$config{srcdir}/".htmlfn($guid->{page}); - unlink $IkiWiki::Plugin::transient::transientdir."/".htmlfn($guid->{page}); + unlink $IkiWiki::Plugin::transient::transientdir."/".htmlfn($guid->{page}) + || unlink "$config{srcdir}/".htmlfn($guid->{page}); } delete $guids{$guid->{guid}}; } -- cgit v1.2.3