cvs: pear-core /PEAR Installer.php
| From: | Greg Beaver | Date: | Fri, 16 Feb 2007 00:34:41 +0000 |
| Subject: | cvs: pear-core /PEAR Installer.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5419@lists.php.net to get a copy of this message | ||
cellog Fri Feb 16 00:34:41 2007 UTC
Modified files:
/pear-core/PEAR Installer.php
Log:
fix Bug #10108: update-error with backups from test-Folder
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Installer.php?r1=1.241&r2=1.242&diff_format=u
Index: pear-core/PEAR/Installer.php
diff -u pear-core/PEAR/Installer.php:1.241 pear-core/PEAR/Installer.php:1.242
--- pear-core/PEAR/Installer.php:1.241 Mon Jan 8 05:43:49 2007
+++ pear-core/PEAR/Installer.php Fri Feb 16 00:34:41 2007
@@ -18,7 +18,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Installer.php,v 1.241 2007/01/08 05:43:49 cellog Exp $
+ * @version CVS: $Id: Installer.php,v 1.242 2007/02/16 00:34:41 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -726,10 +726,18 @@
}
$this->_dirtree = array();
// {{{ really commit the transaction
- foreach ($this->file_operations as $tr) {
+ foreach ($this->file_operations as $i => $tr) {
+ if (!$tr) {
+ // support removal of non-existing backups
+ continue;
+ }
list($type, $data) = $tr;
switch ($type) {
case 'backup':
+ if (!file_exists($data[0])) {
+ $this->file_operations[$i] = false;
+ break;
+ }
if (!@copy($data[0], $data[0] . '.bak')) {
$this->log(1, 'Could not copy ' . $data[0] . ' to '
. $data[0] .
'.bak ' . $php_errormsg);