From: Joey Hess Date: Sun, 15 Jan 2012 20:39:13 +0000 (-0400) Subject: attachment: Fix utf-8 display bug. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1572c3c376df36ea09e27a1ea437e3a75cdf0f84;p=ikiwiki.git attachment: Fix utf-8 display bug. --- diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index fd4096edf..5a180cd5c 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -272,6 +272,7 @@ sub attachments_save { my @attachments; my $dir=attachment_holding_location($form->field('page')); foreach my $filename (glob("$dir/*")) { + $filename=Encode::decode_utf8($filename); next unless -f $filename; my $destdir=$config{srcdir}."/". linkpage(IkiWiki::possibly_foolish_untaint( @@ -345,6 +346,7 @@ sub attachment_list ($) { my $dir=attachment_holding_location($page); my $heldmsg=gettext("this attachment is not yet saved"); foreach my $file (glob("$dir/*")) { + $file=Encode::decode_utf8($file); next unless -f $file; my $base=IkiWiki::basename($file); my $f=$loc.$base; diff --git a/debian/changelog b/debian/changelog index 9c4e83c2f..1eab184f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ ikiwiki (3.20120115) unstable; urgency=low * Make backlink(.) work. Thanks, Giuseppe Bilotta. - * Workaround discount's eliding of