summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel McManus <gmcmanus@gmail.com>2008-07-20 17:40:16 +1000
committerJoey Hess <joey@kodama.kitenet.net>2008-07-23 16:00:26 -0400
commitd9062864ee7ad8248ad41c0b1cd17ec5f2f4dafc (patch)
tree9a28441502fd4c48fa68bde0f80aa00b98433081
parent7fa3a2f83b1f5e67c96072a1a2185c36b0867332 (diff)
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)
-rw-r--r--IkiWiki/Render.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index ab3ccd7ae..90058199c 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -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)) {