* Make sure that if pathsToLink contains an element such as

"/share/info" that it doesn't match "/share/information.nix".

svn path=/nixpkgs/trunk/; revision=23059
This commit is contained in:
Eelco Dolstra 2010-08-09 16:08:02 +00:00
parent be3d5d3496
commit e875ec2524

View File

@ -17,7 +17,10 @@ sub isInPathsToLink {
my $path = shift;
$path = "/" if $path eq "";
foreach my $elem (@pathsToLink) {
return 1 if substr($path, 0, length($elem)) eq $elem;
return 1 if
$elem eq "/" ||
(substr($path, 0, length($elem)) eq $elem
&& (($path eq $elem) || (substr($path, length($elem), 1) eq "/")));
}
return 0;
}