be more flexible on '..' and '.' in existing symlinks
This commit is contained in:
parent
e00b84ec84
commit
2a848d22af
2 changed files with 8 additions and 3 deletions
|
@ -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>
|
Sat Jan 26 16:15:21 2002 Guillaume Morin <gmorin@gnu.org>
|
||||||
|
|
||||||
* stow.in: if $ENV{'STOW_DIR'} is set, this becomes the default
|
* stow.in: if $ENV{'STOW_DIR'} is set, this becomes the default
|
||||||
|
|
6
stow.in
6
stow.in
|
@ -526,9 +526,9 @@ sub FindStowMember {
|
||||||
while (@path) {
|
while (@path) {
|
||||||
$x = shift(@path);
|
$x = shift(@path);
|
||||||
if ($x eq '..') {
|
if ($x eq '..') {
|
||||||
pop(@x);
|
# ignore if /, since /.. is /
|
||||||
return '' unless @x;
|
pop(@x) if scalar(@x) > 1;
|
||||||
} elsif ($x) {
|
} elsif ($x ne '.') {
|
||||||
push(@x, $x);
|
push(@x, $x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue