diff options
author | Elan Ruusamäe <glen@delfi.ee> | 2013-01-23 13:55:25 +0200 |
---|---|---|
committer | Elan Ruusamäe <glen@delfi.ee> | 2013-01-23 13:57:31 +0200 |
commit | f2cb3ec76dec3fe2b40f25765ef842223c7132fe (patch) | |
tree | d37d48bcabfc2e3415650ebd7f08dd2c739179f2 /inc/Tar.class.php | |
parent | fb83d19fe0215e7fa5e71a1ab713342e8f84d9d1 (diff) | |
download | rpg-f2cb3ec76dec3fe2b40f25765ef842223c7132fe.tar.gz rpg-f2cb3ec76dec3fe2b40f25765ef842223c7132fe.tar.bz2 |
handle bzip1 as well
in fact .tbz is tar.bz (bzip1) and .tbz2 is what tar.bz2 is used
commonly.
Diffstat (limited to 'inc/Tar.class.php')
-rw-r--r-- | inc/Tar.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/Tar.class.php b/inc/Tar.class.php index 59e14c705..86fe65abb 100644 --- a/inc/Tar.class.php +++ b/inc/Tar.class.php @@ -618,7 +618,7 @@ class Tar { $file = strtolower($file); if(substr($file, -3) == '.gz' || substr($file, -4) == '.tgz') { $comptype = Tar::COMPRESS_GZIP; - } elseif(substr($file, -4) == '.bz2' || substr($file, -4) == '.tbz') { + } elseif(substr($file, -4) == '.bz2' || substr($file, -3) == '.bz' || substr($file, -4) == '.tbz' || substr($file, -5) == ".tbz2") { $comptype = Tar::COMPRESS_BZIP; } else { $comptype = Tar::COMPRESS_NONE; @@ -631,4 +631,4 @@ class TarIOException extends Exception { } class TarIllegalCompressionException extends Exception { -}
\ No newline at end of file +} |