fix expensive move code path

master
Joey Hess 2008-07-01 13:48:07 -04:00
parent 7cd40ea4eb
commit d7ca2f8f9b
2 changed files with 4 additions and 1 deletions

View File

@ -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});

View File

@ -180,7 +180,7 @@ sub scan ($) { #{{{
}
} #}}}
sub fast_file_copy ($$$$$) { #{{{
sub fast_file_copy (@) { #{{{
my $srcfile=shift;
my $destfile=shift;
my $srcfd=shift;