fixed bug when stow dir is /foo

This commit is contained in:
Guillaume Morin 2002-01-20 11:42:50 +00:00
parent 8813658049
commit d9e2ebaf26
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Sun Jan 20 12:41:39 2002 Guillaume Morin <gmorin@gnu.org>
* stow.in: fixed a bug if the stow directory is /foo.
Bug spotted and fixed by Jim Radford <radford@blackbean.org>.
Wed Jan 9 02:20:15 2002 Gaël Roualland <gael.roualland@iname.com>
* stow.in: added the '--ignore' and '--force' options.

View file

@ -545,7 +545,9 @@ sub parent {
local($path) = join('/', @_);
local(@elts) = split(/\/+/, $path);
pop(@elts);
join('/', @elts);
# if @_ = ('/foo')
# join('/',@elts) would be ''
join('/', @elts) || '/';
}
sub usage {