#18710 [Opn->Csd]: dirname("/") returns ("\")
| From: | iliaa@php.net | Date: | Fri, 01 Nov 2002 00:53:32 +0000 |
| Subject: | #18710 [Opn->Csd]: dirname("/") returns ("\") | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-23867@lists.php.net to get a copy of this message | ||
ID: 18710
Updated by: iliaa@php.net
Reported By: duncan@emarketeers.com
-Status: Open
+Status: Closed
Bug Type: *Directory/Filesystem functions
Operating System: Windows 2000
PHP Version: 4.2.2
Previous Comments:
------------------------------------------------------------------------
[2002-08-02 14:18:02] duncan@emarketeers.com
dirname() in windows works inconsistently.
dirname("/a/b") returns "/a"
but dirname("/") returns "\"
This makes writing portable code which will work on Unix and Windows
problematic.
I've looked at ext/standard/string.c and I think the fix would be to
replace all occurrences of DEFAULT_SLASH with "/"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18710&edit=1