[Scummvm-cvs-logs] scummvm-web master -> 8e8ba5d3ecee67a80b98641f8712eb0103985e57

sev- sev at scummvm.org
Sat Mar 5 23:00:48 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
8e8ba5d3ec WEB: Show .tar.bz2 as extension, not .bz2


Commit: 8e8ba5d3ecee67a80b98641f8712eb0103985e57
    https://github.com/scummvm/scummvm-web/commit/8e8ba5d3ecee67a80b98641f8712eb0103985e57
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-05T23:00:23+01:00

Commit Message:
WEB: Show .tar.bz2 as extension, not .bz2

Changed paths:
    include/Objects/File.php



diff --git a/include/Objects/File.php b/include/Objects/File.php
index f3376a6..0ab796a 100644
--- a/include/Objects/File.php
+++ b/include/Objects/File.php
@@ -59,7 +59,12 @@ class File extends BasicObject {
 					}
 				}
 				$this->_extra_info['size'] = $sz;
-				$this->_extra_info['ext'] = substr($url, (strrpos($url, '.')));
+				$ext = substr($url, (strrpos($url, '.')));
+
+				if ($ext == '.bz2' || $ext == '.gz' || $ext == '.xz' || $ext == '.7z')
+					$ext = substr($url, strrpos($url, '.', -(strlen($url) - strrpos($url, '.') + 1)));
+
+				$this->_extra_info['ext'] = $ext;
 				$this->_extra_info['msg'] = $data['extra_msg'];
 			}
 		}






More information about the Scummvm-git-logs mailing list