cvs: pear /Net_FTP/Net FTP.php

From: Date: Sun, 14 Mar 2004 13:04:29 +0000
Subject: cvs: pear /Net_FTP/Net FTP.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-17388@lists.php.net to get a copy of this message
toby Sun Mar 14 08:04:29 2004 EDT Modified files: /pear/Net_FTP/Net FTP.php Log: *Fix bug #240: mkdir() with $recursive===true doesn't support "single" directories. http://cvs.php.net/diff.php/pear/Net_FTP/Net/FTP.php?r1=1.8&r2=1.9&ty=u Index: pear/Net_FTP/Net/FTP.php diff -u pear/Net_FTP/Net/FTP.php:1.8 pear/Net_FTP/Net/FTP.php:1.9 --- pear/Net_FTP/Net/FTP.php:1.8 Fri Feb 20 17:42:22 2004 +++ pear/Net_FTP/Net/FTP.php Sun Mar 14 08:04:29 2004 @@ -14,7 +14,7 @@ // | Authors: Tobias Schlitt <toby@php.net> | // +----------------------------------------------------------------------+ // -// $Id: FTP.php,v 1.8 2004/02/20 22:42:22 farell Exp $ +// $Id: FTP.php,v 1.9 2004/03/14 13:04:29 toby Exp $ require_once 'PEAR.php'; @@ -277,12 +277,18 @@ } } else { $pos = 0; + if(strpos($dir, '/') === false) { + return $this->mkdir($dir,false); + } $elements = array(); while (false !== ($pos = strpos($dir, '/', $pos + 1))){ $elements[] = substr($dir, 0, $pos); } foreach ($elements as $element){ - $this->mkdir($element, false); + $res = $this->mkdir($element, false); + if($res !== true) { + return $res; + } } return true; }

« previous php.pear.cvs (#17388) next »