cvs: pear /File_Archive Archive.php /File_Archive/Archive/Reader Ar.php
| From: | Vincent Lascaux | Date: | Sun, 22 May 2005 21:20:38 +0000 |
| Subject: | cvs: pear /File_Archive Archive.php /File_Archive/Archive/Reader Ar.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-32013@lists.php.net to get a copy of this message | ||
vincentlascaux Sun May 22 17:20:38 2005 EDT
Modified files:
/pear/File_Archive Archive.php
/pear/File_Archive/Archive/Reader Ar.php
Log:
+ Correct two typos in Ar reader
http://cvs.php.net/diff.php/pear/File_Archive/Archive.php?r1=1.42&r2=1.43&ty=u
Index: pear/File_Archive/Archive.php
diff -u pear/File_Archive/Archive.php:1.42 pear/File_Archive/Archive.php:1.43
--- pear/File_Archive/Archive.php:1.42 Sat May 21 15:02:34 2005
+++ pear/File_Archive/Archive.php Sun May 22 17:20:37 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: Archive.php,v 1.42 2005/05/21 19:02:34 pfischer Exp $
+ * @version CVS: $Id: Archive.php,v 1.43 2005/05/22 21:20:37 vincentlascaux Exp $
* @link http://pear.php.net/package/File_Archive
*/
@@ -364,7 +364,7 @@
$extension == 'tgz' ||
$extension == 'tbz' ||
$extension == 'bz2' ||
- $extension == 'bzip2' ||
+ $extension == 'bzip2' ||
$extension == 'ar' ||
$extension == 'deb';
}
http://cvs.php.net/diff.php/pear/File_Archive/Archive/Reader/Ar.php?r1=1.2&r2=1.3&ty=u
Index: pear/File_Archive/Archive/Reader/Ar.php
diff -u pear/File_Archive/Archive/Reader/Ar.php:1.2 pear/File_Archive/Archive/Reader/Ar.php:1.3
--- pear/File_Archive/Archive/Reader/Ar.php:1.2 Sun May 22 16:38:07 2005
+++ pear/File_Archive/Archive/Reader/Ar.php Sun May 22 17:20:38 2005
@@ -108,7 +108,7 @@
}
$this->source->skip(
- $this->_nbBytesLefts + ($this->_footer ? 1 : 0)
+ $this->_nbBytesLeft + ($this->_footer ? 1 : 0)
);
$filename = $this->source->getDataFilename();
@@ -142,6 +142,7 @@
// if the filename starts with a length, then just read the bytes of it
if (preg_match("/\#1\/(\d+)/", $name, $matches)) {
+ echo "matches : {$matches[1]}\n";
$name = $this->source->getData($matches[1]);
$size -= $matches[1];
} else {
@@ -150,8 +151,8 @@
}
$this->_nbBytesLeft = $size;
- if (!empty($name) && !empty($mtime) && !empty($uid) &&
- !empty($gid) && !empty($mode) && !empty($size)) {
+ if (empty($name) || empty($mtime) || empty($uid) ||
+ empty($gid) || empty($mode) || empty($size)) {
return PEAR::raiseError("An ar field is empty");
}
@@ -179,7 +180,7 @@
if ($length == 0) {
return null;
} else {
- $this->nbBytesLeft -= $length;
+ $this->_nbBytesLeft -= $length;
return $this->source->getData($length);
}
}