mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 15:49:57 +09:00
Skip a directory when validator cannot access the directory.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4571 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4c82c46add
commit
7ab2c814f8
1 changed files with 13 additions and 11 deletions
|
|
@ -83,18 +83,20 @@
|
||||||
if(substr($base_path,-1)=='/') $base_path = substr($base_path,0,-1);
|
if(substr($base_path,-1)=='/') $base_path = substr($base_path,0,-1);
|
||||||
if(in_array($path, $avoid_path)) return;
|
if(in_array($path, $avoid_path)) return;
|
||||||
|
|
||||||
$oDir = dir($path);
|
$oDir = @dir($path);
|
||||||
while($item = $oDir->read()) {
|
if($oDir) {
|
||||||
if(substr($item,0,1)=='.' && $item != '.htaccess' ) continue;
|
while($item = $oDir->read()) {
|
||||||
$new_path = $path.'/'.$item;
|
if(substr($item,0,1)=='.' && $item != '.htaccess' ) continue;
|
||||||
if(!is_dir($new_path)) {
|
$new_path = $path.'/'.$item;
|
||||||
$filesize = filesize($new_path);
|
if(!is_dir($new_path)) {
|
||||||
$filename = substr($new_path, strlen($base_path)+1);
|
$filesize = filesize($new_path);
|
||||||
$buff[$filename] = $filesize;
|
$filename = substr($new_path, strlen($base_path)+1);
|
||||||
} else {
|
$buff[$filename] = $filesize;
|
||||||
getFiles($new_path, $base_path, $avoid_path, $buff);
|
} else {
|
||||||
|
getFiles($new_path, $base_path, $avoid_path, $buff);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$oDir->close();
|
||||||
}
|
}
|
||||||
$oDir->close();
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue