avoid calling getctime on internal pages
[ikiwiki.git] / IkiWiki / Render.pm
index 782818cdf49a92917bd4e6762319746841da6d5f..302b1839519de4d23ad5d64432e9f3088e458060 100644 (file)
@@ -330,17 +330,17 @@ sub refresh () { #{{{
                        }
                        else {
                                push @add, $file;
                        }
                        else {
                                push @add, $file;
-                       }
-                       $pagecase{lc $page}=$page;
-                       if ($config{getctime} && -e "$config{srcdir}/$file") {
-                               eval {
-                                       my $time=rcs_getctime("$config{srcdir}/$file");
-                                       $pagectime{$page}=$time;
-                               };
-                               if ($@) {
-                                       print STDERR $@;
+                               if ($config{getctime} && -e "$config{srcdir}/$file") {
+                                       eval {
+                                               my $time=rcs_getctime("$config{srcdir}/$file");
+                                               $pagectime{$page}=$time;
+                                       };
+                                       if ($@) {
+                                               print STDERR $@;
+                                       }
                                }
                        }
                                }
                        }
+                       $pagecase{lc $page}=$page;
                        if (! exists $pagectime{$page}) {
                                $pagectime{$page}=mtime(srcfile($file));
                        }
                        if (! exists $pagectime{$page}) {
                                $pagectime{$page}=mtime(srcfile($file));
                        }