Adding error supression to chmod() making folder::chmod() functionally similar to delete(). Closes #5393

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7573 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-09-08 20:38:55 +00:00
parent 19d4f3d596
commit 7e55088b77

View file

@ -368,7 +368,7 @@ class Folder extends Object {
}
if ($recursive === false && is_dir($path)) {
if (chmod($path, intval($mode, 8))) {
if (@chmod($path, intval($mode, 8))) {
$this->__messages[] = sprintf(__('%s changed to %s', true), $path, $mode);
return true;
} else {
@ -388,7 +388,7 @@ class Folder extends Object {
continue;
}
if (chmod($fullpath, intval($mode, 8))) {
if (@chmod($fullpath, intval($mode, 8))) {
$this->__messages[] = sprintf(__('%s changed to %s', true), $fullpath, $mode);
} else {
$this->__errors[] = sprintf(__('%s NOT changed to %s', true), $fullpath, $mode);