aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/map.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-28 17:22:17 -0500
committerJoey Hess <joey@kitenet.net>2007-12-28 17:22:17 -0500
commit3e784ea8a1aeb41aa181c29b499cf76ab83dc6d0 (patch)
tree9aba1602658f98515eda1e582d1b8d7e27765f9d /IkiWiki/Plugin/map.pm
parent191287b72fdd9db48e4ca937f6530015a7d1df91 (diff)
downloadikiwiki-3e784ea8a1aeb41aa181c29b499cf76ab83dc6d0.tar
ikiwiki-3e784ea8a1aeb41aa181c29b499cf76ab83dc6d0.tar.gz
* map: Fix handling of common prefix to handle the case where it's
in a subdirectory. Patch by Larry Clapp.
Diffstat (limited to 'IkiWiki/Plugin/map.pm')
-rw-r--r--IkiWiki/Plugin/map.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm
index 5b6af1f36..581ae5011 100644
--- a/IkiWiki/Plugin/map.pm
+++ b/IkiWiki/Plugin/map.pm
@@ -37,6 +37,9 @@ sub preprocess (@) { #{{{
my @b=split(/\//, $common_prefix);
$common_prefix="";
while (@a && @b && $a[0] eq $b[0]) {
+ if (length $common_prefix) {
+ $common_prefix.="/";
+ }
$common_prefix.=shift(@a);
shift @b;
}