cvs: pear /File_Archive/Archive Reader.php /File_Archive/Archive/Reader Ar.php Archive.php Bzip2.php Gzip.php Tar.php Uncompress.php Zip.php
| From: | Vincent Lascaux | Date: | Mon, 23 May 2005 12:46:57 +0000 |
| Subject: | cvs: pear /File_Archive/Archive Reader.php /File_Archive/Archive/Reader Ar.php Archive.php Bzip2.php Gzip.php Tar.php Uncompress.php Zip.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-32055@lists.php.net to get a copy of this message | ||
vincentlascaux Mon May 23 08:46:57 2005 EDT
Modified files:
/pear/File_Archive/Archive Reader.php
/pear/File_Archive/Archive/Reader Ar.php Archive.php Bzip2.php
Gzip.php Tar.php Uncompress.php
Zip.php
Log:
+ The uncompress reader didn't close properly.
+ The Ar reader didn't reset its state properly while closing
+ Remove the $innerClose parameter from Archive
http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader.php?r1=1.19&r2=1.20&ty=u Index: pear/File_Archive/Archive/Reader.php diff -u pear/File_Archive/Archive/Reader.php:1.19 pear/File_Archive/Archive/Reader.php:1.20 --- pear/File_Archive/Archive/Reader.php:1.19 Mon May 23 07:37:46 2005 +++ pear/File_Archive/Archive/Reader.php Mon May 23 08:46:57 2005 @@ -27,7 +27,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: Reader.php,v 1.19 2005/05/23 11:37:46 vincentlascaux Exp $ + * @version CVS: $Id: Reader.php,v 1.20 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -121,6 +121,28 @@ } /** + * Returns the list of filenames from the current pos to the end of the source + * The source will be closed after having called this function + * This function goes through the whole archive (which may be slow). + * If you intend to work on the reader, doing it in one pass would be faster + * + * @return array filenames from the current pos to the end of the source + */ + function getFileList() + { + $result = array(); + while ( ($error = $this->next()) === true) { + $result[] = $this->getFilename(); + } + $this->close(); + if (PEAR::isError($error)) { + return $error; + } else { + return $result; + } + } + + /** * Returns an array of statistics about the file * (see the PHP stat function for more information) * @@ -179,8 +201,11 @@ /** * Put back the reader in the state it was before the first call * to next() + * + * @param $recursive If true, close eventual inner writer even if + * it was given opened? */ - function close() + function close($recursive = false) { return PEAR::raiseError("Reader abstract function call (close)"); } @@ -326,8 +351,13 @@ */ function makeAppendWriter() { - while ($this->next()) { } - return $this->makeWriter(); + while ( ($error = $this->next()) === true ) { } + if (PEAR::isError($error)) { + $this->close(); + return $error; + } else { + return $this->makeWriter(); + } } } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Ar.php?r1=1.3&r2=1.4&ty=u Index: pear/File_Archive/Archive/Reader/Ar.php diff -u pear/File_Archive/Archive/Reader/Ar.php:1.3 pear/File_Archive/Archive/Reader/Ar.php:1.4 --- pear/File_Archive/Archive/Reader/Ar.php:1.3 Sun May 22 17:20:38 2005 +++ pear/File_Archive/Archive/Reader/Ar.php Mon May 23 08:46:57 2005 @@ -86,6 +86,9 @@ { $this->_currentFilename = null; $this->_currentStat = null; + $this->_nbBytesLeft = 0; + $this->_footer = false; + $this->_alreadyRead = false; return parent::close(); } @@ -116,7 +119,7 @@ if (!$this->_alreadyRead) { $header = $this->source->getData(8); if ($header != "!<arch>\n") { - return PEAR::raiseError("File {$filename} is not a valid Ar file format"); + return PEAR::raiseError("File {$filename} is not a valid Ar file format (starts with $header)"); } $this->_alreadyRead = true; } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Archive.php?r1=1.10&r2=1.11&ty=u Index: pear/File_Archive/Archive/Reader/Archive.php diff -u pear/File_Archive/Archive/Reader/Archive.php:1.10 pear/File_Archive/Archive/Reader/Archive.php:1.11 --- pear/File_Archive/Archive/Reader/Archive.php:1.10 Fri May 6 16:19:49 2005 +++ pear/File_Archive/Archive/Reader/Archive.php Mon May 23 08:46:57 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: Archive.php,v 1.10 2005/05/06 20:19:49 vincentlascaux Exp $ + * @version CVS: $Id: Archive.php,v 1.11 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -83,12 +83,13 @@ * Close the source if it was given closed in the constructor * * @see File_Archive_Reader::close() - * @param bool $innerClose if false, the inner source won't be closed */ - function close($innerClose = true) + function close() { - if (!$this->sourceInitiallyOpened && $this->sourceOpened && $innerClose) { - $error = $this->source->close(); + if (!$this->sourceInitiallyOpened && $this->sourceOpened) { + if ($this->source !== null) { + $error = $this->source->close(); + } $this->sourceOpened = false; if (PEAR::isError($error)) { return $error; http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Bzip2.php?r1=1.5&r2=1.6&ty=u Index: pear/File_Archive/Archive/Reader/Bzip2.php diff -u pear/File_Archive/Archive/Reader/Bzip2.php:1.5 pear/File_Archive/Archive/Reader/Bzip2.php:1.6 --- pear/File_Archive/Archive/Reader/Bzip2.php:1.5 Fri May 6 16:19:49 2005 +++ pear/File_Archive/Archive/Reader/Bzip2.php Mon May 23 08:46:57 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: Bzip2.php,v 1.5 2005/05/06 20:19:49 vincentlascaux Exp $ + * @version CVS: $Id: Bzip2.php,v 1.6 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -168,6 +168,7 @@ //Create the writer $innerWriter = $this->source->makeWriter(); + $this->source = null; $writer = new File_Archive_Writer_Bzip2(null, $innerWriter); //And compress data from the temporary file @@ -178,7 +179,7 @@ fclose($tmp); //Do not close inner writer since makeWriter was called - $this->close(false); + $this->close(); return $writer; } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Gzip.php?r1=1.14&r2=1.15&ty=u Index: pear/File_Archive/Archive/Reader/Gzip.php diff -u pear/File_Archive/Archive/Reader/Gzip.php:1.14 pear/File_Archive/Archive/Reader/Gzip.php:1.15 --- pear/File_Archive/Archive/Reader/Gzip.php:1.14 Sun May 22 17:36:06 2005 +++ pear/File_Archive/Archive/Reader/Gzip.php Mon May 23 08:46:57 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: Gzip.php,v 1.14 2005/05/22 21:36:06 vincentlascaux Exp $ + * @version CVS: $Id: Gzip.php,v 1.15 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -174,6 +174,7 @@ //Create the writer $innerWriter = $this->source->makeWriter(); + $this->source = null; $writer = new File_Archive_Writer_Gzip(null, $innerWriter); //And compress data from the temporary file @@ -184,7 +185,7 @@ fclose($tmp); //Do not close inner writer since makeWriter was called - $this->close(false); + $this->close(); return $writer; } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Tar.php?r1=1.16&r2=1.17&ty=u Index: pear/File_Archive/Archive/Reader/Tar.php diff -u pear/File_Archive/Archive/Reader/Tar.php:1.16 pear/File_Archive/Archive/Reader/Tar.php:1.17 --- pear/File_Archive/Archive/Reader/Tar.php:1.16 Sat May 21 18:25:23 2005 +++ pear/File_Archive/Archive/Reader/Tar.php Mon May 23 08:46:57 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: Tar.php,v 1.16 2005/05/21 22:25:23 vincentlascaux Exp $ + * @version CVS: $Id: Tar.php,v 1.17 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -209,7 +209,8 @@ } else { $writer = $this->source->makeWriter(); } - $this->close(false); + $this->source = null; + $this->close(); return new File_Archive_Writer_Tar(null, $writer); } } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Uncompress.php?r1=1.22&r2=1.23&ty=u Index: pear/File_Archive/Archive/Reader/Uncompress.php diff -u pear/File_Archive/Archive/Reader/Uncompress.php:1.22 pear/File_Archive/Archive/Reader/Uncompress.php:1.23 --- pear/File_Archive/Archive/Reader/Uncompress.php:1.22 Sun May 22 17:26:54 2005 +++ pear/File_Archive/Archive/Reader/Uncompress.php Mon May 23 08:46:57 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: Uncompress.php,v 1.22 2005/05/22 21:26:54 vincentlascaux Exp $ + * @version CVS: $Id: Uncompress.php,v 1.23 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -44,6 +44,13 @@ var $readers = array(); /** + * @var array of readers to close when closing this + * This is filled by setBaseDir, with the readers that are needed to + * reach the specified dir, but must not be stacked + */ + var $toClose = array(); + + /** * @var File_Archive_Reader Reader from which all started (usefull to be * able to close) * @access private @@ -199,7 +206,7 @@ } else if (PEAR::isError($error)) { return $error; } - $this->startReader = $this->source; + $this->toClose = $this->readers; $this->readers = array(); $this->currentFileDisplayed = false; @@ -244,11 +251,19 @@ for($i=0; $i<count($this->readers); ++$i) { $this->readers[$i]->close(); } + for($i=0; $i<count($this->toClose); ++$i) { + $this->toClose[$i]->close(); + } $this->readers = array(); $error = parent::close(); + $this->source =& $this->startReader; + $this->source->close(); + $this->currentFileDisplayed = true; + $this->setBaseDir($this->baseDir); + return $error; } } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Zip.php?r1=1.14&r2=1.15&ty=u Index: pear/File_Archive/Archive/Reader/Zip.php diff -u pear/File_Archive/Archive/Reader/Zip.php:1.14 pear/File_Archive/Archive/Reader/Zip.php:1.15 --- pear/File_Archive/Archive/Reader/Zip.php:1.14 Sat May 21 18:25:23 2005 +++ pear/File_Archive/Archive/Reader/Zip.php Mon May 23 08:46:57 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: Zip.php,v 1.14 2005/05/21 22:25:23 vincentlascaux Exp $ + * @version CVS: $Id: Zip.php,v 1.15 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -48,7 +48,7 @@ /** * @see File_Archive_Reader::close() */ - function close($innerClose = true) + function close() { $this->currentFilename = null; $this->currentStat = null; @@ -57,7 +57,7 @@ $this->seekToEnd = 0; $this->files = array(); - return parent::close($innerClose); + return parent::close(); } /** @@ -271,7 +271,8 @@ } } - $this->close(false); + $this->source = null; + $this->close(); return $writer; } }
http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader.php?r1=1.19&r2=1.20&ty=u Index: pear/File_Archive/Archive/Reader.php diff -u pear/File_Archive/Archive/Reader.php:1.19 pear/File_Archive/Archive/Reader.php:1.20 --- pear/File_Archive/Archive/Reader.php:1.19 Mon May 23 07:37:46 2005 +++ pear/File_Archive/Archive/Reader.php Mon May 23 08:46:57 2005 @@ -27,7 +27,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: Reader.php,v 1.19 2005/05/23 11:37:46 vincentlascaux Exp $ + * @version CVS: $Id: Reader.php,v 1.20 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -121,6 +121,28 @@ } /** + * Returns the list of filenames from the current pos to the end of the source + * The source will be closed after having called this function + * This function goes through the whole archive (which may be slow). + * If you intend to work on the reader, doing it in one pass would be faster + * + * @return array filenames from the current pos to the end of the source + */ + function getFileList() + { + $result = array(); + while ( ($error = $this->next()) === true) { + $result[] = $this->getFilename(); + } + $this->close(); + if (PEAR::isError($error)) { + return $error; + } else { + return $result; + } + } + + /** * Returns an array of statistics about the file * (see the PHP stat function for more information) * @@ -179,8 +201,11 @@ /** * Put back the reader in the state it was before the first call * to next() + * + * @param $recursive If true, close eventual inner writer even if + * it was given opened? */ - function close() + function close($recursive = false) { return PEAR::raiseError("Reader abstract function call (close)"); } @@ -326,8 +351,13 @@ */ function makeAppendWriter() { - while ($this->next()) { } - return $this->makeWriter(); + while ( ($error = $this->next()) === true ) { } + if (PEAR::isError($error)) { + $this->close(); + return $error; + } else { + return $this->makeWriter(); + } } } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Ar.php?r1=1.3&r2=1.4&ty=u Index: pear/File_Archive/Archive/Reader/Ar.php diff -u pear/File_Archive/Archive/Reader/Ar.php:1.3 pear/File_Archive/Archive/Reader/Ar.php:1.4 --- pear/File_Archive/Archive/Reader/Ar.php:1.3 Sun May 22 17:20:38 2005 +++ pear/File_Archive/Archive/Reader/Ar.php Mon May 23 08:46:57 2005 @@ -86,6 +86,9 @@ { $this->_currentFilename = null; $this->_currentStat = null; + $this->_nbBytesLeft = 0; + $this->_footer = false; + $this->_alreadyRead = false; return parent::close(); } @@ -116,7 +119,7 @@ if (!$this->_alreadyRead) { $header = $this->source->getData(8); if ($header != "!<arch>\n") { - return PEAR::raiseError("File {$filename} is not a valid Ar file format"); + return PEAR::raiseError("File {$filename} is not a valid Ar file format (starts with $header)"); } $this->_alreadyRead = true; } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Archive.php?r1=1.10&r2=1.11&ty=u Index: pear/File_Archive/Archive/Reader/Archive.php diff -u pear/File_Archive/Archive/Reader/Archive.php:1.10 pear/File_Archive/Archive/Reader/Archive.php:1.11 --- pear/File_Archive/Archive/Reader/Archive.php:1.10 Fri May 6 16:19:49 2005 +++ pear/File_Archive/Archive/Reader/Archive.php Mon May 23 08:46:57 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: Archive.php,v 1.10 2005/05/06 20:19:49 vincentlascaux Exp $ + * @version CVS: $Id: Archive.php,v 1.11 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -83,12 +83,13 @@ * Close the source if it was given closed in the constructor * * @see File_Archive_Reader::close() - * @param bool $innerClose if false, the inner source won't be closed */ - function close($innerClose = true) + function close() { - if (!$this->sourceInitiallyOpened && $this->sourceOpened && $innerClose) { - $error = $this->source->close(); + if (!$this->sourceInitiallyOpened && $this->sourceOpened) { + if ($this->source !== null) { + $error = $this->source->close(); + } $this->sourceOpened = false; if (PEAR::isError($error)) { return $error; http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Bzip2.php?r1=1.5&r2=1.6&ty=u Index: pear/File_Archive/Archive/Reader/Bzip2.php diff -u pear/File_Archive/Archive/Reader/Bzip2.php:1.5 pear/File_Archive/Archive/Reader/Bzip2.php:1.6 --- pear/File_Archive/Archive/Reader/Bzip2.php:1.5 Fri May 6 16:19:49 2005 +++ pear/File_Archive/Archive/Reader/Bzip2.php Mon May 23 08:46:57 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: Bzip2.php,v 1.5 2005/05/06 20:19:49 vincentlascaux Exp $ + * @version CVS: $Id: Bzip2.php,v 1.6 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -168,6 +168,7 @@ //Create the writer $innerWriter = $this->source->makeWriter(); + $this->source = null; $writer = new File_Archive_Writer_Bzip2(null, $innerWriter); //And compress data from the temporary file @@ -178,7 +179,7 @@ fclose($tmp); //Do not close inner writer since makeWriter was called - $this->close(false); + $this->close(); return $writer; } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Gzip.php?r1=1.14&r2=1.15&ty=u Index: pear/File_Archive/Archive/Reader/Gzip.php diff -u pear/File_Archive/Archive/Reader/Gzip.php:1.14 pear/File_Archive/Archive/Reader/Gzip.php:1.15 --- pear/File_Archive/Archive/Reader/Gzip.php:1.14 Sun May 22 17:36:06 2005 +++ pear/File_Archive/Archive/Reader/Gzip.php Mon May 23 08:46:57 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: Gzip.php,v 1.14 2005/05/22 21:36:06 vincentlascaux Exp $ + * @version CVS: $Id: Gzip.php,v 1.15 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -174,6 +174,7 @@ //Create the writer $innerWriter = $this->source->makeWriter(); + $this->source = null; $writer = new File_Archive_Writer_Gzip(null, $innerWriter); //And compress data from the temporary file @@ -184,7 +185,7 @@ fclose($tmp); //Do not close inner writer since makeWriter was called - $this->close(false); + $this->close(); return $writer; } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Tar.php?r1=1.16&r2=1.17&ty=u Index: pear/File_Archive/Archive/Reader/Tar.php diff -u pear/File_Archive/Archive/Reader/Tar.php:1.16 pear/File_Archive/Archive/Reader/Tar.php:1.17 --- pear/File_Archive/Archive/Reader/Tar.php:1.16 Sat May 21 18:25:23 2005 +++ pear/File_Archive/Archive/Reader/Tar.php Mon May 23 08:46:57 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: Tar.php,v 1.16 2005/05/21 22:25:23 vincentlascaux Exp $ + * @version CVS: $Id: Tar.php,v 1.17 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -209,7 +209,8 @@ } else { $writer = $this->source->makeWriter(); } - $this->close(false); + $this->source = null; + $this->close(); return new File_Archive_Writer_Tar(null, $writer); } } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Uncompress.php?r1=1.22&r2=1.23&ty=u Index: pear/File_Archive/Archive/Reader/Uncompress.php diff -u pear/File_Archive/Archive/Reader/Uncompress.php:1.22 pear/File_Archive/Archive/Reader/Uncompress.php:1.23 --- pear/File_Archive/Archive/Reader/Uncompress.php:1.22 Sun May 22 17:26:54 2005 +++ pear/File_Archive/Archive/Reader/Uncompress.php Mon May 23 08:46:57 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: Uncompress.php,v 1.22 2005/05/22 21:26:54 vincentlascaux Exp $ + * @version CVS: $Id: Uncompress.php,v 1.23 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -44,6 +44,13 @@ var $readers = array(); /** + * @var array of readers to close when closing this + * This is filled by setBaseDir, with the readers that are needed to + * reach the specified dir, but must not be stacked + */ + var $toClose = array(); + + /** * @var File_Archive_Reader Reader from which all started (usefull to be * able to close) * @access private @@ -199,7 +206,7 @@ } else if (PEAR::isError($error)) { return $error; } - $this->startReader = $this->source; + $this->toClose = $this->readers; $this->readers = array(); $this->currentFileDisplayed = false; @@ -244,11 +251,19 @@ for($i=0; $i<count($this->readers); ++$i) { $this->readers[$i]->close(); } + for($i=0; $i<count($this->toClose); ++$i) { + $this->toClose[$i]->close(); + } $this->readers = array(); $error = parent::close(); + $this->source =& $this->startReader; + $this->source->close(); + $this->currentFileDisplayed = true; + $this->setBaseDir($this->baseDir); + return $error; } } http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Zip.php?r1=1.14&r2=1.15&ty=u Index: pear/File_Archive/Archive/Reader/Zip.php diff -u pear/File_Archive/Archive/Reader/Zip.php:1.14 pear/File_Archive/Archive/Reader/Zip.php:1.15 --- pear/File_Archive/Archive/Reader/Zip.php:1.14 Sat May 21 18:25:23 2005 +++ pear/File_Archive/Archive/Reader/Zip.php Mon May 23 08:46:57 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: Zip.php,v 1.14 2005/05/21 22:25:23 vincentlascaux Exp $ + * @version CVS: $Id: Zip.php,v 1.15 2005/05/23 12:46:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -48,7 +48,7 @@ /** * @see File_Archive_Reader::close() */ - function close($innerClose = true) + function close() { $this->currentFilename = null; $this->currentStat = null; @@ -57,7 +57,7 @@ $this->seekToEnd = 0; $this->files = array(); - return parent::close($innerClose); + return parent::close(); } /** @@ -271,7 +271,8 @@ } } - $this->close(false); + $this->source = null; + $this->close(); return $writer; } }