cvs: pear /File_Archive/Archive/Writer Files.php

From: Date: Thu, 26 May 2005 18:30:43 +0000
Subject: cvs: pear /File_Archive/Archive/Writer Files.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32140@lists.php.net to get a copy of this message
vincentlascaux Thu May 26 14:30:43 2005 EDT Modified files: /pear/File_Archive/Archive/Writer Files.php Log: Correct a bug in mkdirr http://cvs.php.net/diff.php/pear/File_Archive/Archive/Writer/Files.php?r1=1.14&r2=1.15&ty=u Index: pear/File_Archive/Archive/Writer/Files.php diff -u pear/File_Archive/Archive/Writer/Files.php:1.14 pear/File_Archive/Archive/Writer/Files.php:1.15 --- pear/File_Archive/Archive/Writer/Files.php:1.14 Mon May 23 14:54:36 2005 +++ pear/File_Archive/Archive/Writer/Files.php Thu May 26 14:30:43 2005 @@ -25,7 +25,7 @@ * @author Vincent Lascaux <vincentlascaux@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.gnu.org/copyleft/lesser.html LGPL - * @version CVS: $Id: Files.php,v 1.14 2005/05/23 18:54:36 vincentlascaux Exp $ + * @version CVS: $Id: Files.php,v 1.15 2005/05/26 18:30:43 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -82,14 +82,14 @@ // Crawl up the directory tree $next_pathname = substr( $pathname, - 0, strrpos($pathname, DIRECTORY_SEPARATOR)); - if (($error = $this->mkdirr($next_pathname)) === true) { - if (!mkdir($pathname)) { - return PEAR::raiseError("Unable to create directory $pathname"); - } - } else { + 0, strrpos($pathname, "/")); + $error = $this->mkdirr($next_pathname); + if (PEAR::isError($error)) { return $error; } + if (!@mkdir($pathname)) { + return PEAR::raiseError("Unable to create directory $pathname"); + } } /**

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