Remove .gz extension if found in map file

This commit is contained in:
slawkens 2020-10-27 07:25:38 +01:00
parent 42a628731d
commit 41e24ca535

View File

@ -99,6 +99,10 @@ class Towns
$mapFile = config('data_path') . 'world/' . $mapName;
}
if (strpos($mapFile, '.gz') !== false) {
$mapFile = str_replace('.gz', '', $mapFile);
}
$towns = [];
if (file_exists($mapFile)) {
ini_set('memory_limit', '-1');
@ -131,4 +135,4 @@ class Towns
return $towns;
}
}
}