Update pico.php
Added ignore for tmp file extensions in the get_files() method. When editing plugins with emacs, the get_files() method also grabs the temp files, which leads to a "Can't redclare class [PluginName]" error. Side note: Would these arrays be better in a property (ala DRY)?
This commit is contained in:
parent
184b18383f
commit
dfb5900835
@ -327,6 +327,9 @@ class Pico {
|
|||||||
$array_items = array();
|
$array_items = array();
|
||||||
if($handle = opendir($directory)){
|
if($handle = opendir($directory)){
|
||||||
while(false !== ($file = readdir($handle))){
|
while(false !== ($file = readdir($handle))){
|
||||||
|
if(in_array(substr($file, -1), array('~', '#'))){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(preg_match("/^(^\.)/", $file) === 0){
|
if(preg_match("/^(^\.)/", $file) === 0){
|
||||||
if(is_dir($directory. "/" . $file)){
|
if(is_dir($directory. "/" . $file)){
|
||||||
$array_items = array_merge($array_items, $this->get_files($directory. "/" . $file, $ext));
|
$array_items = array_merge($array_items, $this->get_files($directory. "/" . $file, $ext));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user