summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 47116089b..97c835cf6 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -949,16 +949,16 @@ sub formattime ($;$) {
sub beautify_urlpath ($) {
my $url=shift;
- if ($config{usedirs}) {
- $url =~ s!/index.$config{htmlext}$!/!;
- }
-
# Ensure url is not an empty link, and if necessary,
# add ./ to avoid colon confusion.
if ($url !~ /^\// && $url !~ /^\.\.\//) {
$url="./$url";
}
+ if ($config{usedirs}) {
+ $url =~ s!/index.$config{htmlext}$!/!;
+ }
+
return $url;
}