X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f4773f6a833f12a37c319ebeafe920b4bb7169ff..b698bf24082b2de96dc7bba92ecfbc20e650c0ea:/IkiWiki/Render.pm diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 302b18395..18324914b 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -211,9 +211,19 @@ sub render ($) { #{{{ writefile($output, $config{destdir}, genpage($page, $content)); } else { - my $srcfd=readfile($srcfile, 1, 1); delete $depends{$file}; will_render($file, $file, 1); + + if ($config{hardlink}) { + prep_writefile($file, $config{destdir}); + unlink($config{destdir}."/".$file); + if (link($srcfile, $config{destdir}."/".$file)) { + return; + } + # if hardlink fails, fall back top copying + } + + my $srcfd=readfile($srcfile, 1, 1); writefile($file, $config{destdir}, undef, 1, sub { my $destfd=shift; my $cleanup=shift;