We should only check directories for being writable

这个提交包含在:
phl0 2023-11-16 09:36:56 +01:00
父节点 dc4927dda9
当前提交 936e60089a
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A

查看文件

@ -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;