More foolproof region file extension check

This commit is contained in:
Dylan K. Taylor 2016-12-23 12:40:04 +00:00
parent 3848f6f39c
commit 3672d60bf4

View File

@ -211,7 +211,7 @@ class McRegion extends BaseLevelProvider{
if($isValid){
$files = glob($path . "/region/*.mc*");
foreach($files as $f){
if(strpos($f, "." . static::REGION_FILE_EXTENSION) === false){
if(substr($f, strrpos($f, ".") + 1) !== static::REGION_FILE_EXTENSION){
$isValid = false;
break;
}