be more flexible on '..' and '.' in existing symlinks

This commit is contained in:
Gaël Roualland 2002-02-08 23:54:07 +00:00
parent e00b84ec84
commit 2a848d22af
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Sat Feb 9 00:48:38 2002 Gaël Roualland <gael.roualland@iname.com>
* stow.in: be more flexible on '..' and '.' in existing symlinks
when trying to find if they point to the stow directory.
Sat Jan 26 16:15:21 2002 Guillaume Morin <gmorin@gnu.org>
* stow.in: if $ENV{'STOW_DIR'} is set, this becomes the default

View file

@ -526,9 +526,9 @@ sub FindStowMember {
while (@path) {
$x = shift(@path);
if ($x eq '..') {
pop(@x);
return '' unless @x;
} elsif ($x) {
# ignore if /, since /.. is /
pop(@x) if scalar(@x) > 1;
} elsif ($x ne '.') {
push(@x, $x);
}
}