]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/aggregate.pm
important robustness fix
[ikiwiki.git] / IkiWiki / Plugin / aggregate.pm
index 23428cb0e7a3d3e59d32931248ec3d97d9654e50..33d7174f5367a394846462080bd0786840e33ad0 100644 (file)
@@ -35,14 +35,14 @@ sub getopt () { #{{{
 } #}}}
 
 sub checkconfig () { #{{{
+       IkiWiki::lockwiki();
+       loadstate();
        if ($IkiWiki::config{aggregate}) {
-               IkiWiki::lockwiki();
-               loadstate();
                IkiWiki::loadindex();
                aggregate();
                savestate();
-               IkiWiki::unlockwiki();
        }
+       IkiWiki::unlockwiki();
 } #}}}
 
 sub filter (@) { #{{{
@@ -267,7 +267,7 @@ sub add_page (@) { #{{{
                        $page=$feed->{dir}."/item";
                }
                my $c="";
-               while (exists $IkiWiki::pagecase{lc $page} ||
+               while (exists $IkiWiki::pagecase{lc $page.$c} ||
                       -e pagefile($page.$c)) {
                        $c++
                }