From 7a0944c567cc15f073ce3d553f5e1299add72be4 Mon Sep 17 00:00:00 2001 From: gwoo Date: Sun, 20 May 2007 05:25:18 +0000 Subject: [PATCH] small change in folder chmod git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5127 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/folder.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cake/libs/folder.php b/cake/libs/folder.php index f36934aec..842b20c92 100644 --- a/cake/libs/folder.php +++ b/cake/libs/folder.php @@ -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) {