small change in folder chmod

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5127 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-05-20 05:25:18 +00:00
parent 3a31e38937
commit 7a0944c567

View file

@ -332,13 +332,14 @@ class Folder extends Object{
* @return bool Returns TRUE on success, FALSE on failure
*/
function chmod($path, $mode = false, $exceptions = false) {
if (!is_dir($path)) {
return chmod($path, intval($mode, 8));
}
if(!$mode) {
$mode = $this->mode;
}
if (is_dir($path)) {
return chmod($path, intval($mode, 8));
}
$dir = opendir($path);
if($dir) {