Hi Pierre,
In general you are right.
I fixed the behavior of realpath() to do the same as php-5.2, where
"c:file" means the same as "c:\file".
However, on Windows "c:file" means different thing. It means the "file"
from current working directory on drive "c" (each drive has its own CWD
which can be retrieved using _getdcwd()).
May be it's a good idea to fix it in 5.3, btw the fix will require to
change IS_ABSOLUTE_PATH() macro to check for additional slash that may
affect some extensions (e.g. phar and zip). Also ZTS (or virtual CWD)
build may behave differently in case of keeping single CWD. It probably
need to be extended to keep separate CWD for each drive.
Any thoughts? Do you think we should fix it?
Thanks. Dmitry.
Pierre Joye wrote:
hi Dmitry,
On Wed, Jan 21, 2009 at 8:07 PM, Dmitry Stogov <dmi...@php.net> wrote:
dmitry Wed Jan 21 19:07:44 2009 UTC
Modified files: (Branch: PHP_5_3)
/TSRM tsrm_virtual_cwd.c
/php-src/ext/standard/tests/file fopen_variation10-win32.phpt
fopen_variation11-win32.phpt
Log:
Fixed realpath() behavior to support "c:dir" as "c:\dir", and "\dir" on UNC CWD
"c:dir" as "c:\dir", do you mean that C:dir is the same than c:\dir ?
If yes, it is then not correct. It should relative to the current
directory for the drive C:.
Cheers,
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php