summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki5
1 files changed, 2 insertions, 3 deletions
diff --git a/ikiwiki b/ikiwiki
index f95ea0f09..7e140bbec 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -307,15 +307,14 @@ sub parentlinks ($) { #{{{
my $skip=1;
foreach my $dir (reverse split("/", $page)) {
if (! $skip) {
+ $path.="../";
unshift @ret, { url => "$path$dir.html", page => $dir };
}
else {
$skip=0;
}
- $path.="../";
}
- $path=~s!../!!;
- unshift @ret, { url => $path , page => $config{wikiname} };
+ unshift @ret, { url => length $path ? $path : ".", page => $config{wikiname} };
return @ret;
} #}}}