diff options
author | Joey Hess <joey@kitenet.net> | 2007-12-28 17:22:17 -0500 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2007-12-28 17:22:17 -0500 |
commit | 3e784ea8a1aeb41aa181c29b499cf76ab83dc6d0 (patch) | |
tree | 9aba1602658f98515eda1e582d1b8d7e27765f9d /IkiWiki/Plugin/map.pm | |
parent | 191287b72fdd9db48e4ca937f6530015a7d1df91 (diff) | |
download | ikiwiki-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.pm | 3 |
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; } |