From 41e24ca535344f8b71bbc34b430adb70ed8704a3 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 27 Oct 2020 07:25:38 +0100 Subject: [PATCH] Remove .gz extension if found in map file --- system/libs/Towns.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/libs/Towns.php b/system/libs/Towns.php index 3a0c5974..01caa550 100644 --- a/system/libs/Towns.php +++ b/system/libs/Towns.php @@ -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; } -} \ No newline at end of file +}