aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index e98888d76..e1cb68462 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -365,14 +365,26 @@ sub find_new_files ($) {
}
else {
push @new, $file;
- if ($config{getctime} && -e "$config{srcdir}/$file") {
+ if ($config{gettime} && -e "$config{srcdir}/$file") {
eval {
- my $time=rcs_getctime("$config{srcdir}/$file");
- $pagectime{$page}=$time;
+ my $ctime=rcs_getctime("$config{srcdir}/$file");
+ if ($ctime > 0) {
+ $pagectime{$page}=$ctime;
+ }
};
if ($@) {
print STDERR $@;
}
+ my $mtime;
+ eval {
+ my $mtime=rcs_getmtime("$config{srcdir}/$file");
+ };
+ if ($@) {
+ print STDERR $@;
+ }
+ elsif ($mtime > 0) {
+ utime($mtime, $mtime, "$config{srcdir}/$file");
+ }
}
}
$pagecase{lc $page}=$page;