From d7ca2f8f9be00ac05d86c9a3abdba0c8ef3a3800 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Jul 2008 13:48:07 -0400 Subject: [PATCH] fix expensive move code path --- IkiWiki/Plugin/attachment.pm | 3 +++ IkiWiki/Render.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 106660012..a474f6e75 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -72,6 +72,9 @@ sub formbuilder (@) { #{{{ } } + # Needed for fast_file_copy. + require IkiWiki::Render; + # Move the attachment into place. # Try to use a fast rename; fall back to copying. IkiWiki::prep_writefile($filename, $config{srcdir}); diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 2cdec421f..5184be2df 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -180,7 +180,7 @@ sub scan ($) { #{{{ } } #}}} -sub fast_file_copy ($$$$$) { #{{{ +sub fast_file_copy (@) { #{{{ my $srcfile=shift; my $destfile=shift; my $srcfd=shift; -- 2.39.2