cvs: pear /Archive_Tar Tar.php

From: Date: Thu, 10 Jan 2002 21:09:53 +0000
Subject: cvs: pear /Archive_Tar Tar.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1902@lists.php.net to get a copy of this message
vblavet Thu Jan 10 16:09:53 2002 EDT Modified files: /pear/Archive_Tar Tar.php Log: * Correct bug in createModify() method. * Parameters p_add_dir and p_remove_dir were not taken correctly * While adding a folder, and stripping the folder path, the 'home' path should be ignored. It was not ignored, nor stripped. (found thanks to Krzysztof D.) Index: pear/Archive_Tar/Tar.php diff -u pear/Archive_Tar/Tar.php:1.13 pear/Archive_Tar/Tar.php:1.14 --- pear/Archive_Tar/Tar.php:1.13 Tue Dec 18 16:00:33 2001 +++ pear/Archive_Tar/Tar.php Thu Jan 10 16:09:53 2002 @@ -16,7 +16,7 @@ // | Authors: Vincent Blavet <vincent@blavet.net> | // +----------------------------------------------------------------------+ // -// $Id: Tar.php,v 1.13 2001/12/18 21:00:33 vblavet Exp $ +// $Id: Tar.php,v 1.14 2002/01/10 21:09:53 vblavet Exp $ require_once 'PEAR.php'; @@ -24,7 +24,7 @@ * Creates a (compressed) Tar archive * * @author Vincent Blavet <vincent@blavet.net> -* @version $Revision: 1.13 $ +* @version $Revision: 1.14 $ * @package Archive */ class Archive_Tar extends PEAR @@ -194,7 +194,7 @@ return false; } - $v_result = $this->_addList($v_list, '', ''); + $v_result = $this->_addList($v_list, $p_add_dir, $p_remove_dir); } if ($v_result) { @@ -540,6 +540,9 @@ // ----- Calculate the stored filename $v_stored_filename = $p_filename; + if (strcmp($p_filename, $p_remove_dir) == 0) { + return true; + } if ($p_remove_dir != '') { if (substr($p_remove_dir, -1) != '/') $p_remove_dir .= '/';

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