Re: PHP 4.0 Bug #6999 Updated: dirname() returns empty string for "/foo/"

From: Date: Tue, 03 Oct 2000 15:03:05 +0000
Subject: Re: PHP 4.0 Bug #6999 Updated: dirname() returns empty string for "/foo/"
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-34166@lists.php.net to get a copy of this message
Bug Database wrote: > I think the main problem here is to decide what the behavior should be before we apply patches. > Is "/foo/" supposed to result in "/" or "/foo". I don't know either. I've checked C implementation of dirname() on NetBSD and it returns "/", as does dirname(1). dirname(1) on Solaris prints "/", too. So the POSIX.2 correct answer is probably to return "/". Jaromir -- Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/ @@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@

« previous php.dev (#34166) next »