diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 80c0242517..8e07e6d1b8 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -142,7 +142,10 @@ class compress $ext = ''; $this->filelist[$name]++; - if (($pos = strrpos($name, '.')) !== false) { + // Separate the extension off the end of the filename to preserve it + $pos = strrpos($name, '.'); + if ($pos !== false) + { $start = substr($name, 0, $pos); $ext = substr($name, $pos); }