--- MT.pm.orig Sat Mar 12 08:28:21 2005 +++ MT.pm Sat Mar 12 08:31:46 2005 @@ -691,6 +691,16 @@ { # (silly ruse to make the diff more transparent.) # Calculate file path and URL for the new entry. my $file = File::Spec->catfile($arch_root, $map->{__saved_output_file}); + ## DLD + ## If the file is a directory, append on "index.html" or whatever + ## the correct extension is. Since the directory may not yet + ## exist, see if the basename is empty. If so, then it must be a + ## directory. + if (basename($file) eq "") { + my $ext = $blog->file_extension || 'html'; + $file = File::Spec->catfile($file, "index." . $ext); + } + my $url = $blog->archive_url; $url .= '/' unless $url =~ m|/$|; $url .= $map->{__saved_output_file};