mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-02 16:23:04 +00:00
PluginBase->getResources() should only return files
Directories should not be returned. Previously it even returns resources\.. according to my test on Windows.
This commit is contained in:
@ -229,9 +229,11 @@ abstract class PluginBase implements Plugin{
|
||||
$resources = [];
|
||||
if(is_dir($this->file . "resources/")){
|
||||
foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->file . "resources/")) as $resource){
|
||||
if($resource->isFile()){
|
||||
$resources[] = $resource;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $resources;
|
||||
}
|
||||
|
Reference in New Issue
Block a user