From 3e784ea8a1aeb41aa181c29b499cf76ab83dc6d0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Dec 2007 17:22:17 -0500 Subject: * map: Fix handling of common prefix to handle the case where it's in a subdirectory. Patch by Larry Clapp. --- IkiWiki/Plugin/map.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'IkiWiki/Plugin') 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; } -- cgit v1.2.3