From 2a848d22af350e08a72be92421f8e0a6330a6101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Roualland?= Date: Fri, 8 Feb 2002 23:54:07 +0000 Subject: [PATCH] be more flexible on '..' and '.' in existing symlinks --- ChangeLog | 5 +++++ stow.in | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 644d9da..79caa0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Feb 9 00:48:38 2002 Gaël Roualland + + * 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 * stow.in: if $ENV{'STOW_DIR'} is set, this becomes the default diff --git a/stow.in b/stow.in index 43638bd..049094e 100644 --- a/stow.in +++ b/stow.in @@ -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); } }