cvs: pear-core / System.php
| From: | Greg Beaver | Date: | Sun, 20 Feb 2005 20:54:43 +0000 |
| Subject: | cvs: pear-core / System.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-29560@lists.php.net to get a copy of this message | ||
cellog Sun Feb 20 15:54:43 2005 EDT
Modified files:
/pear-core System.php
Log:
add is_writeable() check to mkdir
http://cvs.php.net/diff.php/pear-core/System.php?r1=1.45&r2=1.46&ty=u
Index: pear-core/System.php
diff -u pear-core/System.php:1.45 pear-core/System.php:1.46
--- pear-core/System.php:1.45 Fri Dec 31 23:53:58 2004
+++ pear-core/System.php Sun Feb 20 15:54:41 2005
@@ -16,7 +16,7 @@
// | Authors: Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: System.php,v 1.45 2005/01/01 04:53:58 cellog Exp $
+// $Id: System.php,v 1.46 2005/02/20 20:54:41 cellog Exp $
//
require_once 'PEAR.php';
@@ -48,7 +48,7 @@
*
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
-* @version $Revision: 1.45 $
+* @version $Revision: 1.46 $
* @access public
* @see http://pear.php.net/manual/
*/
@@ -246,6 +246,10 @@
$dir = dirname($dir);
}
while ($newdir = array_shift($dirstack)) {
+ if (!is_writeable(dirname($newdir))) {
+ $ret = false;
+ break;
+ }
if (!mkdir($newdir, $mode)) {
$ret = false;
}