diff options
author | Greg Beaver <cellog@php.net> | 2003-09-17 00:00:40 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2003-09-17 00:00:40 +0000 |
commit | 13bf53b65888f3b6fc3da6bb64b0719f2b9d1d63 (patch) | |
tree | d92f28fe345b5435a6bdd49bad4fdebaa5d56685 | |
parent | 7a0fcc45a80cb7cd45ff0b5a60c425803b137057 (diff) | |
download | php-git-13bf53b65888f3b6fc3da6bb64b0719f2b9d1d63.tar.gz |
correct typo "committed"
add error checking to commitFileTransaction()
-rw-r--r-- | pear/PEAR/Installer.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index 6747b29c9b..419f71c34e 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -396,6 +396,9 @@ class PEAR_Installer extends PEAR_Common 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 @@ class PEAR_Installer extends PEAR_Common } 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 @@ class PEAR_Installer extends PEAR_Common break; } } - $this->log(2, "successfully commited $n file operations"); + $this->log(2, "successfully committed $n file operations"); $this->file_operations = array(); return true; } |