On Tue, 30 Sep 2008, Randall R Schulz wrote:- <snip>
However, the second one doesn't work well if you're in "/" or a directory whose immediate parent is "/", in which case you get an empty string. The first gives you an empty string if you're in "/", which may or may not be acceptable for you. It is different than what basename and dirname yield, certainly.
True. To match the behavior of both dirname and basename, you'd need to check for an empty string and return '/' instead. Regards, David Bolt -- Team Acorn: http://www.distributed.net/ OGR-P2 @ ~100Mnodes RC5-72 @ ~15Mkeys SUSE 10.1 32 | | openSUSE 10.3 32b | openSUSE 11.0 32b | openSUSE 10.2 64b | openSUSE 10.3 64b | openSUSE 11.0 64b RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.11 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org