cvs: pear-core /PEAR DependencyDB.php

From: Date: Sun, 26 Mar 2006 23:33:27 +0000
Subject: cvs: pear-core /PEAR DependencyDB.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4668@lists.php.net to get a copy of this message
cellog Sun Mar 26 23:33:27 2006 UTC Modified files: /pear-core/PEAR DependencyDB.php Log: remove as many @ as possible http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/DependencyDB.php?r1=1.31&r2=1.32&diff_format=u Index: pear-core/PEAR/DependencyDB.php diff -u pear-core/PEAR/DependencyDB.php:1.31 pear-core/PEAR/DependencyDB.php:1.32 --- pear-core/PEAR/DependencyDB.php:1.31 Sat Mar 25 21:09:08 2006 +++ pear-core/PEAR/DependencyDB.php Sun Mar 26 23:33:27 2006 @@ -16,7 +16,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: DependencyDB.php,v 1.31 2006/03/25 21:09:08 cellog Exp $ + * @version CVS: $Id: DependencyDB.php,v 1.32 2006/03/26 23:33:27 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -137,12 +137,12 @@ function hasWriteAccess() { - if (!@file_exists($this->_depdb)) { + if (!file_exists($this->_depdb)) { $dir = $this->_depdb; while ($dir && $dir != '.') { $dir = dirname($dir); // cd .. - if ($dir != '.' && @file_exists($dir)) { - if (@is_writeable($dir)) { + if ($dir != '.' && file_exists($dir)) { + if (is_writeable($dir)) { return true; } else { return false; @@ -151,7 +151,7 @@ } return false; } - return @is_writeable($this->_depdb); + return is_writeable($this->_depdb); } // {{{ assertDepsDB() @@ -424,8 +424,11 @@ $open_mode = 'w'; // XXX People reported problems with LOCK_SH and 'w' if ($mode === LOCK_SH) { - if (@!is_file($this->_lockfile)) { + if (!file_exists($this->_lockfile)) { touch($this->_lockfile); + } elseif (!is_file($this->_lockfile)) { + return PEAR::raiseError('could not create Dependency lock file, ' . + 'it exists and is not a regular file'); } $open_mode = 'r'; }

« previous php.pear.core (#4668) next »