PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_FTP » Bug #7146

Recursive mkdir fails on Windows

Details

Submitted2006-03-17 20:46 UTC
Fromphilip at e-frag dot co dot uk
Assignedjorrit
StatusClosed
PackageNet_FTP
PHP Version5.1.1
OSWindows
Roadmaps1.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.