function _out_pathes($out_dir, $pathes = array()){
if($dh = opendir($out_dir)){
while(($file = readdir($dh)) !== false){
- if(is_dir($out_dir.$file) && substr($file, 0 ,1) != ".") $pathes[] = $file;
+ if(is_dir($out_dir.$file) && substr($file, 0 ,1) != "." && !in_array($file, $pathes)) $pathes[] = $file;
}
closedir($dh);
}