#37350 [Opn->Bgs]: realpath doesn't canonicalize drive letter case
| From: | bjori@php.net | Date: | Sun, 07 May 2006 18:21:44 +0000 |
| Subject: | #37350 [Opn->Bgs]: realpath doesn't canonicalize drive letter case | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96771@lists.php.net to get a copy of this message | ||
ID: 37350
Updated by: bjori@php.net
Reported By: k95vz5f02 at sneakemail dot com
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Windows XP SP2
PHP Version: 5.1.4
New Comment:
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()
Previous Comments:
------------------------------------------------------------------------
[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