From: Tomas V.V.Cox Date: Sun, 19 Aug 2001 12:37:51 +0000 (+0000) Subject: better error hanlding X-Git-Tag: PRE_SUBST_Z_MACROS~442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df54bca0a0cc2bc5d6f477364719e269995c0996;p=php better error hanlding --- diff --git a/pear/PEAR/Packager.php b/pear/PEAR/Packager.php index 0df36e03e1..d09406d745 100644 --- a/pear/PEAR/Packager.php +++ b/pear/PEAR/Packager.php @@ -155,13 +155,13 @@ class PEAR_Packager extends PEAR_Common } } //Maintain original file perms - $orig_perms = fileperms($fname); + $orig_perms = @fileperms($fname); if (!@copy($fname, $file)) { $this->log(0, "could not copy $fname to $file"); } else { $this->log(2, "+ copying from $fname to $file"); + @chmod($file, $orig_perms); } - chmod($file, $orig_perms); } // XXX TODO: Rebuild the package file as the old method did?