adding umask to file so cache files will be created without throwing an error when transitioning from shell to browser

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7763 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-10-18 20:11:41 +00:00
parent f861d685d5
commit f9f1c4df50

View file

@ -119,7 +119,9 @@ class File extends Object {
function create() { function create() {
$dir = $this->Folder->pwd(); $dir = $this->Folder->pwd();
if (is_dir($dir) && is_writable($dir) && !$this->exists()) { if (is_dir($dir) && is_writable($dir) && !$this->exists()) {
$old = umask(0);
if (touch($this->pwd())) { if (touch($this->pwd())) {
umask($old);
return true; return true;
} }
} }