Skip to content

Commit df54bca

Browse files
committed
better error hanlding
1 parent cf70755 commit df54bca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pear/PEAR/Packager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ function package($pkgfile = 'package.xml')
155155
}
156156
}
157157
//Maintain original file perms
158-
$orig_perms = fileperms($fname);
158+
$orig_perms = @fileperms($fname);
159159
if (!@copy($fname, $file)) {
160160
$this->log(0, "could not copy $fname to $file");
161161
} else {
162162
$this->log(2, "+ copying from $fname to $file");
163+
@chmod($file, $orig_perms);
163164
}
164-
chmod($file, $orig_perms);
165165
}
166166
// XXX TODO: Rebuild the package file as the old method did?
167167

0 commit comments

Comments
 (0)