We should only check directories for being writable
这个提交包含在:
父节点
dc4927dda9
当前提交
936e60089a
共有 1 个文件被更改,包括 5 次插入 和 3 次删除
|
|
@ -52,9 +52,11 @@ class Debug extends CI_Controller {
|
|||
// Check if the subdirectories are writable (recursive check)
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
|
||||
foreach ($iterator as $item) {
|
||||
if (!is_writable($item->getPathname())) {
|
||||
return false;
|
||||
}
|
||||
if ($item->isDir() && basename($item->getPathName()) != '..') {
|
||||
if (!is_writable($item->getRealPath())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
正在加载…
在新工单中引用