From: Joey Hess Date: Fri, 10 Jun 2011 22:47:57 +0000 (-0400) Subject: aggregate: Improve checking for too long aggregated filenames. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8e15f664c4f3c9260c771fee52f6f5ae20ccdddf;p=ikiwiki.git aggregate: Improve checking for too long aggregated filenames. Two problems fixed: 1. Files are written with a .ikiwiki-new suffix, which has to be taken into account. 2. Need to count length of bytes, not of unicode characters. --- diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 4a704617e..7f50b54f0 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -643,7 +643,7 @@ sub add_page (@) { # Make sure that the file name isn't too long. # NB: This doesn't check for path length limits. my $max=POSIX::pathconf($config{srcdir}, &POSIX::_PC_NAME_MAX); - if (defined $max && length(htmlfn($page)) >= $max) { + if (defined $max && length(htmlfn($page).".ikiwiki-new") >= $max) { $c=""; $page=$feed->{dir}."/item"; while (exists $IkiWiki::pagecase{lc $page.$c} || diff --git a/debian/changelog b/debian/changelog index 4b03db600..4fe011f4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ikiwiki (3.20110609) UNRELEASED; urgency=low * userlist: New plugin, lets admins see a list of users and their info. + * aggregate: Improve checking for too long aggregated filenames. -- Joey Hess Thu, 09 Jun 2011 10:06:44 -0400