* 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:
parent
be3d5d3496
commit
e875ec2524
|
@ -17,7 +17,10 @@ sub isInPathsToLink {
|
||||||
my $path = shift;
|
my $path = shift;
|
||||||
$path = "/" if $path eq "";
|
$path = "/" if $path eq "";
|
||||||
foreach my $elem (@pathsToLink) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue