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

From: Date: Mon, 23 May 2005 19:00:21 +0000
Subject: cvs: pear /File_Archive/Archive/Writer Ar.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32077@lists.php.net to get a copy of this message
pfischer Mon May 23 15:00:21 2005 EDT Modified files: /pear/File_Archive/Archive/Writer Ar.php Log: Hrrr... - Ok, then we should use a flag to check if we are at the beginning of the archive or not http://cvs.php.net/diff.php/pear/File_Archive/Archive/Writer/Ar.php?r1=1.4&r2=1.5&ty=u Index: pear/File_Archive/Archive/Writer/Ar.php diff -u pear/File_Archive/Archive/Writer/Ar.php:1.4 pear/File_Archive/Archive/Writer/Ar.php:1.5 --- pear/File_Archive/Archive/Writer/Ar.php:1.4 Mon May 23 14:38:14 2005 +++ pear/File_Archive/Archive/Writer/Ar.php Mon May 23 15:00:20 2005 @@ -60,6 +60,12 @@ var $_currentStat = array (); /** + * @var boolean Flag: beginning of the archive or not + * @access private + */ + var $_atStart = true; + + /** * Flush the memory we have in the ar. * * Build the buffer if its called at the end or initialize @@ -141,9 +147,9 @@ if ($this->_useBuffer) { $this->_buffer .= $data; } else { - if ($this->_currentStat[7] == 0 || - strlen($this->_buffer) == 0) { + if ($this->_atStart) { $this->innerWriter->writeData("!<arch>\n"); + $this->_atStart = false; } $this->innerWriter->writeData($data); }

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