aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-17 16:08:37 -0400
committerJoey Hess <joey@kitenet.net>2010-04-17 16:08:37 -0400
commitf78e6798aa5482e534d7254b87a7b58e9fcc0145 (patch)
treee3851c2762d9e2d7b9973c709ab8763a994ec5a4 /IkiWiki
parent2fc342b048d23d8355631000b7285fb5d26b258a (diff)
downloadikiwiki-f78e6798aa5482e534d7254b87a7b58e9fcc0145.tar
ikiwiki-f78e6798aa5482e534d7254b87a7b58e9fcc0145.tar.gz
move decode_utf8 closer to reason for it
Filenames need to be decoded, as File::Find does not provide them in decoded form, but other callers of verify_src_file will be using utf8.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Render.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 83242a197..fff9dcce6 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -282,7 +282,7 @@ sub srcdir_check () {
}
sub verify_src_file ($$) {
- my $file=decode_utf8(shift);
+ my $file=shift;
my $dir=shift;
return if -l $file || -d _;
@@ -310,7 +310,7 @@ sub find_src_files () {
find({
no_chdir => 1,
wanted => sub {
- my ($file, $page) = verify_src_file($_, $config{srcdir});
+ my ($file, $page) = verify_src_file(decode_utf8($_), $config{srcdir});
if (defined $file) {
push @files, $file;
if ($pages{$page}) {
@@ -324,7 +324,7 @@ sub find_src_files () {
find({
no_chdir => 1,
wanted => sub {
- my ($file, $page) = verify_src_file($_, $dir);
+ my ($file, $page) = verify_src_file(decode_utf8($_), $dir);
if (defined $file) {
# avoid underlaydir override
# attacks; see security.mdwn