mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
f861d685d5
commit
f9f1c4df50
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue