cvs: php-src /pear/PEAR Installer.php
| From: | Greg Beaver | Date: | Wed, 17 Sep 2003 00:00:40 +0000 |
| Subject: | cvs: php-src /pear/PEAR Installer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12789@lists.php.net to get a copy of this message | ||
cellog Tue Sep 16 20:00:40 2003 EDT
Modified files:
/php-src/pear/PEAR Installer.php
Log:
correct typo "committed"
add error checking to commitFileTransaction()
Index: php-src/pear/PEAR/Installer.php
diff -u php-src/pear/PEAR/Installer.php:1.122 php-src/pear/PEAR/Installer.php:1.123
--- php-src/pear/PEAR/Installer.php:1.122 Tue Sep 16 19:42:16 2003
+++ php-src/pear/PEAR/Installer.php Tue Sep 16 20:00:40 2003
@@ -18,7 +18,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.122 2003/09/16 23:42:16 cellog Exp $
+// $Id: Installer.php,v 1.123 2003/09/17 00:00:40 cellog Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
@@ -396,6 +396,9 @@
list($type, $data) = $tr;
switch ($type) {
case 'rename':
+ if (!file_exists($data[0])) {
+ $errors[] = "cannot rename file $data[0], doesn't exist";
+ }
// check that dest dir. is writable
if (!is_writable(dirname($data[1]))) {
$errors[] = "permission denied ($type): $data[1]";
@@ -408,6 +411,9 @@
}
break;
case 'delete':
+ if (!file_exists($data[0])) {
+ $this->log(2, "warning: file $data[0] doesn't exist,
can't be deleted");
+ }
// check that directory is writable
if (file_exists($data[0]) && !is_writable(dirname($data[0]))) {
$errors[] = "permission denied ($type): $data[0]";
@@ -458,7 +464,7 @@
break;
}
}
- $this->log(2, "successfully commited $n file operations");
+ $this->log(2, "successfully committed $n file operations");
$this->file_operations = array();
return true;
}