Home » Networking » Net_FTP » Bug #7146
Recursive mkdir fails on Windows
Details
| Submitted | 2006-03-17 20:46 UTC |
|---|---|
| From | philip at e-frag dot co dot uk |
| Assigned | jorrit |
| Status | Closed |
| Package | Net_FTP |
| PHP Version | 5.1.1 |
| OS | Windows |
| Roadmaps | 1.3.3 |
Comments
[2006-03-17 20:46 UTC] philip at e-frag dot co dot uk
Description:
------------
The mkdir function of the class fails to recursively create the directory structure when run on windows (due to the different behaviour of dirname()).
Test script:
---------------
Replace:
$res = $this->mkdir(dirname($dir), true);
with:
$res = $this->mkdir(str_replace("\\", "/", dirname($dir)), true);
[2006-03-17 21:07 UTC] philip at e-frag dot co dot uk
Infact the fix listed above may break other directories. Hence checking whether the dirname equals "\" probably will be the best fix for this issue.