cvs: pear-core / System.php

From: Date: Fri, 15 Apr 2005 04:45:42 +0000
Subject: cvs: pear-core / System.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-31177@lists.php.net to get a copy of this message
cellog Fri Apr 15 00:45:42 2005 EDT Modified files: /pear-core System.php Log: fix Bug #4095: System::rm does not handle links correctly http://cvs.php.net/diff.php/pear-core/System.php?r1=1.47&r2=1.48&ty=u Index: pear-core/System.php diff -u pear-core/System.php:1.47 pear-core/System.php:1.48 --- pear-core/System.php:1.47 Sun Mar 20 21:18:30 2005 +++ pear-core/System.php Fri Apr 15 00:45:41 2005 @@ -15,7 +15,7 @@ * @author Tomas V.V.Cox <cox@idecnet.com> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: System.php,v 1.47 2005/03/21 02:18:30 cellog Exp $ + * @version CVS: $Id: System.php,v 1.48 2005/04/15 04:45:41 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -128,7 +128,7 @@ } $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ? $list = array(); - while ($file = readdir($dir)) { + while (false !== ($file = readdir($dir))) { if ($file != '.' && $file != '..') { $list[] = $file; } @@ -161,7 +161,7 @@ $struct = array('dirs' => array(), 'files' => array()); settype($files, 'array'); foreach ($files as $file) { - if (is_dir($file)) { + if (is_dir($file) && !is_link($file)) { $tmp = System::_dirToStruct($file, 0); $struct = array_merge_recursive($tmp, $struct); } else {

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