]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
aggregate: Improve checking for too long aggregated filenames.
authorJoey Hess <joey@kitenet.net>
Fri, 10 Jun 2011 22:47:57 +0000 (18:47 -0400)
committerJoey Hess <joey@kitenet.net>
Fri, 10 Jun 2011 22:47:57 +0000 (18:47 -0400)
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
debian/changelog

index 4a704617eed44657282b1ea6bd93be0aeda9fcb7..7f50b54f0cc18fa2f960b5df2ce95e607a62d22b 100644 (file)
@@ -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} ||
index 4b03db600ce572b06b80251d787a84f411932e9e..4fe011f4a86cf19b261032be6e018f679b80c0fe 100644 (file)
@@ -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 <joeyh@debian.org>  Thu, 09 Jun 2011 10:06:44 -0400