]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
minor optimisation
authorJoey Hess <joey@kitenet.net>
Wed, 9 Feb 2011 17:56:05 +0000 (13:56 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 9 Feb 2011 17:56:05 +0000 (13:56 -0400)
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

index 7d456534202bafa8e151db14e0a7375a66b24930..419b40fdb115e221b18876ef11aa6252b6501f21 100644 (file)
@@ -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}};
                }