Now that File facade is removed, we must apply chmod manually

This commit is contained in:
Samuel Georges 2016-08-27 13:38:19 +10:00
parent dd06cd13fa
commit 8075b40bf0
1 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,6 @@
<?php namespace Cms\Classes;
use File;
use Lang;
use Cache;
use Config;
@ -155,6 +156,8 @@ class CodeParser
throw new SystemException(Lang::get('system::lang.file.create_fail', ['name'=>$path]));
}
File::chmod($path);
return $className;
}
@ -317,8 +320,12 @@ class CodeParser
$count = 0;
$dir = dirname($path);
if (is_dir($dir) && !is_writable($dir)) {
throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir]));
if (is_dir($dir)) {
if (!is_writable($dir)) {
throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir]));
}
return;
}
while (!is_dir($dir) && !@mkdir($dir, 0777, true)) {
@ -328,6 +335,8 @@ class CodeParser
throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir]));
}
}
File::chmodRecursive($path);
}
}