summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-01 13:48:07 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-01 13:48:07 -0400
commitd7ca2f8f9be00ac05d86c9a3abdba0c8ef3a3800 (patch)
tree74e2ea1b46fbc363e5a81ba81c87d675832ff40d
parent7cd40ea4eb8955765dc3e61dd3edaf08d1bbab48 (diff)
fix expensive move code path
-rw-r--r--IkiWiki/Plugin/attachment.pm3
-rw-r--r--IkiWiki/Render.pm2
2 files changed, 4 insertions, 1 deletions
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;