On Thu, Feb 7, 2013 at 6:22 PM, Ken Williams via RT
<bug-Path-Class@rt.cpan.org> wrote:
Show quoted text> That's an interesting question. I'm not so sure that's what it should do,
> arguably the parent of '/foo/bar/..' is indeed '/foo/bar', at least if one
> follows the Unix directory links.
/foo/bar/.. is /foo as long as symlinks aren't in the picture.
E.g. assuming /tmp/bar exists, then "mkdir /tmp/bar/../baz" from the
shell will create /tmp/baz.
I think dir("/foo/bar/..")->parent should be "/foo/bar/../..". If
someone wants to sort out the updirs, they can call resolve, after
all.
It's probably relevant for something like dir("/foo/bar/../baz") -- if
someone calls parent twice, they should get "/foo/bar/../.." not
"/foo/bar" as they do now.
David
--
David Golden <dagolden@cpan.org>
Take back your inbox! →
http://www.bunchmail.com/
Twitter/IRC: @xdg