#37350 [Bgs->Opn]: realpath doesn't canonicalize drive letter case
| From: | derick@php.net | Date: | Sun, 07 May 2006 18:41:58 +0000 |
| Subject: | #37350 [Bgs->Opn]: realpath doesn't canonicalize drive letter case | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96774@lists.php.net to get a copy of this message | ||
ID: 37350
Updated by: derick@php.net
Reported By: k95vz5f02 at sneakemail dot com
-Status: Bogus
+Status: Open
Bug Type: Filesystem function related
Operating System: Windows XP SP2
PHP Version: 5.1.4
New Comment:
Realpath is also used internally for f.e. include_once, so this should
be looked into.
Previous Comments:
------------------------------------------------------------------------
[2006-05-07 18:21:43] bjori@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
strcasecmp()
------------------------------------------------------------------------
[2006-05-07 18:08:28] k95vz5f02 at sneakemail dot com
Description:
------------
The realpath function doesn't canonicalize the case of the drive letter
on Windows (and possibly on certain other platforms).
For example:
realpath('C:\WINDOWS') returns 'C:\WINDOWS'
but realpath('c:\WINDOWS') returns 'c:\WINDOWS'
(note the different case of the 'C:')
Hence comparing realpaths cannot reliably be used to check that two
files are the same on Windows.
Reproduce code:
---------------
echo (realpath('C:\WINDOWS')==realpath('c:\WINDOWS')) ? "true" :
"false";
Expected result:
----------------
true
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37350&edit=1