Rebuild pages that change their type.

Previously, if a page changed its type but not its mtime
(e.g. mv page.txt page.mdwn), then it would not be rebuilt.

Now, check if the source of a page has changed,
in which case force a rebuild of that page.
(cherry picked from commit b6a3b8a683fed7a7f6d77a5b3f2dfbd14c849843)
master
Gabriel McManus 2008-07-20 17:40:16 +10:00 committed by Joey Hess
parent 7fa3a2f83b
commit d9062864ee
1 changed files with 4 additions and 0 deletions

View File

@ -319,6 +319,10 @@ sub refresh () { #{{{
# check for added or removed pages
foreach my $file (@files) {
my $page=pagename($file);
if (exists $pagesources{$page} && $pagesources{$page} ne $file) {
# the page has changed its type
$forcerebuild{$page}=1;
}
$pagesources{$page}=$file;
if (! $pagemtime{$page}) {
if (isinternal($page)) {