diff options
-rw-r--r-- | IkiWiki/Render.pm | 19 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 15 insertions, 5 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index f9fbc801f..0e7aa9a48 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -292,12 +292,11 @@ sub find_src_files () { eval q{use File::Find}; error($@) if $@; - my ($page, $dir, $underlay); + my ($page, $underlay); my $helper=sub { my $file=decode_utf8($_); - return if -l $file || -d _; - $file=~s/^\Q$dir\E\/?//; + $file=~s/^\Q.\/\E//; return if ! length $file; $page = pagename($file); if (! exists $pagesources{$page} && @@ -330,17 +329,27 @@ sub find_src_files () { } }; + eval q{use Cwd}; + die $@ if $@; + my $origdir=getcwd(); + + chdir($config{srcdir}) || die "chdir: $!"; find({ no_chdir => 1, wanted => $helper, - }, $dir=$config{srcdir}); + }, '.'); + chdir($origdir) || die "chdir: $!"; + $underlay=1; foreach (@{$config{underlaydirs}}, $config{underlaydir}) { + chdir($_) || die "chdir: $!"; find({ no_chdir => 1, wanted => $helper, - }, $dir=$_); + }, '.'); + chdir($origdir) || die "chdir: $!"; }; + return \@files, \%pages; } diff --git a/debian/changelog b/debian/changelog index bddedeafa..16f14b3a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ ikiwiki (3.20100611) UNRELEASED; urgency=low * editpage, comments: Fix broken links in sidebar (due to forcebaseurl). (Thanks, privat) * calendar: Tune archive_pagespec to only match pages, not other files. + * Fix issues with combining unicode srcdirs and source files. -- Joey Hess <joeyh@debian.org> Fri, 11 Jun 2010 13:39:15 -0400 |