- my $dest=$config{srcdir}."/".
- linkpage(IkiWiki::possibly_foolish_untaint(
- attachment_location($form->field('page')))).
- IkiWiki::basename($filename);
+ my $destdir=linkpage(IkiWiki::possibly_foolish_untaint(
+ attachment_location($form->field('page'))));
+ my $absdestdir=$config{srcdir}."/".$destdir;
+ my $destfile=IkiWiki::basename($filename);
+ my $dest=$absdestdir.$destfile;