mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 08:13:41 +00:00
Merge pull request #2699 from phl0/checkOnlyDirectories
We should only check directories for being writable
This commit is contained in:
commit
99e948a144
@ -52,10 +52,12 @@ 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())) {
|
||||
if ($item->isDir() && basename($item->getPathName()) != '..') {
|
||||
if (!is_writable($item->getRealPath())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user