metatools/sysdeftools/joinsysdef.pl
changeset 660 66ff3e731c60
parent 658 cab9da9b71bb
child 663 8e27d440923e
--- a/metatools/sysdeftools/joinsysdef.pl	Mon Oct 18 10:23:52 2010 +0100
+++ b/metatools/sysdeftools/joinsysdef.pl	Mon Oct 18 10:33:54 2010 +0100
@@ -276,17 +276,19 @@
 		}
 	elsif($tag eq 'unit')
 		{
-		foreach my $atr ('bldFile','mrp','base','proFile')
+		foreach my $atr ('bldFile','mrp','base')
 			{
 			my $link= $node->getAttribute($atr);
 			if($link && !($link=~/^\//))
 				{
 				$link= &abspath(File::Basename::dirname($file)."/$link");
-				foreach my $a (keys %rootmap) {
+				foreach my $a (sort {length($b) - length($a)} keys(%rootmap)) {
 					$link=~s,^$a,$rootmap{$a},ie;
 				}
 				# remove leading ./  which is used to indicate that paths should remain relative
 				$link=~s,^\./([^/]),$1,; 
+				# remove windows drive letter -- only allow paths on the same drive. Use root attribuite to build across drives / filesystems
+				$link=~s,^[a-z]:/,/,i;	
 				$node->setAttribute($atr,$link);
 				}
 			}