From 8e15f664c4f3c9260c771fee52f6f5ae20ccdddf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Jun 2011 18:47:57 -0400 Subject: [PATCH] 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. --- IkiWiki/Plugin/aggregate.pm | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2