#29797 [Com]: mkdir function doesn't work correctly when path contains forward slashes

From: Date: Wed, 01 Sep 2004 14:56:12 +0000
Subject: #29797 [Com]: mkdir function doesn't work correctly when path contains forward slashes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65570@lists.php.net to get a copy of this message
 ID:               29797
 Comment by:       alex dot pagnoni at solarix dot it
 Reported By:      arnoud at procurios dot nl
 Status:           Open
 Bug Type:         Directory function related
 Operating System: Windows XP
 PHP Version:      5.0.0
 New Comment:

Actual workaround is to check for underlying os (look inside
$_ENV['OS']) and, if it is Windows, convert all forward slashes using
str_replace().


Previous Comments:
------------------------------------------------------------------------

[2004-08-23 14:41:27] arnoud at procurios dot nl

Description:
------------
The 'mkdir' function doesn't function correctly on Windows when the
path contains forward slashes. The part of the path with the forward
slashes doesn't get created.

Reproduce code:
---------------
<?

mkdir('c:\a\b\c\d', 0775, true);
mkdir('c:\e\f\g/h', 0775, true);

?>

Expected result:
----------------
Two directories should have been created:
c:\a\b\c\d, and
c:\e\f\g\h

Actual result:
--------------
Actual directories being created:
c:\a\b\c\d, and
C:\e\f


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29797&edit=1


Thread (5 messages)

« previous php.bugs (#65570) next »