longer than the maximum file length.
-e pagefile($page.$c)) {
$c++
}
+
+ # Make sure that the file name isn't too long.
+ # NB: This doesn't check for path length limits.
+ eval q{use POSIX};
+ my $max=POSIX::pathconf($config{srcdir}, &POSIX::_PC_NAME_MAX);
+ if (defined $max && length(htmlpage($page)) >= $max) {
+ $c="";
+ $page="item";
+ while (exists $IkiWiki::pagecase{lc $page.$c} ||
+ -e pagefile($page.$c)) {
+ $c++
+ }
+ }
+
$guid->{page}=$page;
debug(sprintf(gettext("creating new page %s"), $page));
}
* Search in default location for templates as a fallback when templatedir is
pointed elsewhere, so that only modified templates need to be copied into
a templatedir. Based on work by JeremyReed.
+ * In the aggregator, check for and deal with post filenames that are
+ longer than the maximum file length.
- -- Joey Hess <joeyh@debian.org> Sat, 13 Jan 2007 16:31:42 -0500
+ -- Joey Hess <joeyh@debian.org> Sat, 13 Jan 2007 23:03:48 -0500
ikiwiki (1.38) unstable; urgency=low