diff options
author | Simon McVittie <http://smcv.pseudorandom.co.uk/> | 2008-07-13 15:29:28 +0100 |
---|---|---|
committer | Simon McVittie <http://smcv.pseudorandom.co.uk/> | 2008-07-13 15:29:28 +0100 |
commit | c588845a051da89505db9e55158783e1650ff0e2 (patch) | |
tree | 21586594be52aa5b638d02b674c58345627b23ea /IkiWiki/Render.pm | |
parent | e41e96f8325aa4ada5b37b79812c47a8737b753c (diff) | |
parent | f6e6d561e9d0269d8b52bf926adb3f782e777bde (diff) |
Merge branch 'css'
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r-- | IkiWiki/Render.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index c241fd40b..990fcaaa1 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -229,10 +229,14 @@ sub render ($) { #{{{ will_render($file, $file, 1); if ($config{hardlink}) { - prep_writefile($file, $config{destdir}); - unlink($config{destdir}."/".$file); - if (link($srcfile, $config{destdir}."/".$file)) { - return; + # only hardlink if owned by same user + my @stat=stat($srcfile); + if ($stat[4] == $>) { + prep_writefile($file, $config{destdir}); + unlink($config{destdir}."/".$file); + if (link($srcfile, $config{destdir}."/".$file)) { + return; + } } # if hardlink fails, fall back to copying } |