cvs: pear-core /PEAR Builder.php

From: Date: Sun, 05 Mar 2006 21:03:40 +0000
Subject: cvs: pear-core /PEAR Builder.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4605@lists.php.net to get a copy of this message
cellog Sun Mar 5 21:03:40 2006 UTC Modified files: /pear-core/PEAR Builder.php Log: remove err suppression @ # note that this fix in _build_win32 is probably unnecessary # as I doubt we'll ever use _build_win32 again http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Builder.php?r1=1.27&r2=1.28&diff_format=u Index: pear-core/PEAR/Builder.php diff -u pear-core/PEAR/Builder.php:1.27 pear-core/PEAR/Builder.php:1.28 --- pear-core/PEAR/Builder.php:1.27 Fri Jan 6 04:47:36 2006 +++ pear-core/PEAR/Builder.php Sun Mar 5 21:03:39 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: Builder.php,v 1.27 2006/01/06 04:47:36 cellog Exp $ + * @version CVS: $Id: Builder.php,v 1.28 2006/03/05 21:03:39 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -93,13 +93,13 @@ $dir = dirname($pkg->getArchiveFile()); $old_cwd = getcwd(); - if (!@chdir($dir)) { + if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { return $this->raiseError("could not chdir to $dir"); } $this->log(2, "building in $dir"); $dsp = $pkg->getPackage().'.dsp'; - if (!@is_file("$dir/$dsp")) { + if (!file_exists("$dir/$dsp")) { return $this->raiseError("The DSP $dsp does not exist."); } // XXX TODO: make release build type configurable @@ -147,7 +147,8 @@ } else { return $this->raiseError("Could not retrieve output information from $dsp."); } - if (@copy($outfile, "$dir/$out")) { + // realpath returns false if the file doesn't exist + if ($outfile && copy($outfile, "$dir/$out")) { $outfile = "$dir/$out"; }

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