aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-07-10 18:23:09 -0400
committerJoey Hess <joey@kitenet.net>2013-07-10 18:23:09 -0400
commit87f46582f518e48d3875864bfc490a52be739520 (patch)
tree89d0f5960b37aa8e4f077974c85165cea2aead5a /IkiWiki
parent9710d989781038b58a71ec2aebb25f85faa92b53 (diff)
downloadikiwiki-87f46582f518e48d3875864bfc490a52be739520.tar
ikiwiki-87f46582f518e48d3875864bfc490a52be739520.tar.gz
Fix committing attachments when using svn.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index aea70429d..83dd120f6 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -274,15 +274,15 @@ sub attachments_save {
foreach my $filename (glob("$dir/*")) {
$filename=Encode::decode_utf8($filename);
next unless -f $filename;
- my $destdir=$config{srcdir}."/".
- linkpage(IkiWiki::possibly_foolish_untaint(
- attachment_location($form->field('page'))));
+ my $destdir=linkpage(IkiWiki::possibly_foolish_untaint(
+ attachment_location($form->field('page'))));
+ my $absdestdir=$config{srcdir}."/".$destdir;
my $destfile=IkiWiki::basename($filename);
- my $dest=$destdir.$destfile;
+ my $dest=$absdestdir.$destfile;
unlink($dest);
- IkiWiki::prep_writefile($destfile, $destdir);
+ IkiWiki::prep_writefile($destfile, $absdestdir);
rename($filename, $dest);
- push @attachments, $dest;
+ push @attachments, $destdir.$destfile;
}
return unless @attachments;
require IkiWiki::Render;