From: Stig Bakken Date: Mon, 27 May 2002 21:36:28 +0000 (+0000) Subject: * use new Archive_Tar gzip autodetection X-Git-Tag: NEW_UI_API_BP~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=216986ff42b5646c6d7ec6038ef8e2fb8e9e0d01;p=php * use new Archive_Tar gzip autodetection --- diff --git a/pear/PEAR/Common.php b/pear/PEAR/Common.php index f244a03660..2e33375d63 100644 --- a/pear/PEAR/Common.php +++ b/pear/PEAR/Common.php @@ -672,12 +672,7 @@ class PEAR_Common extends PEAR if (!@is_file($file)) { return $this->raiseError("tgz :: could not open file \"$file\""); } - if (substr($file, -4) == '.tar') { - $compress = false; - } else { - $compress = true; - } - $tar = new Archive_Tar($file, $compress); + $tar = new Archive_Tar($file); $content = $tar->listContent(); if (!is_array($content)) { return $this->raiseError("tgz :: could not get contents of package \"$file\""); @@ -1519,7 +1514,6 @@ class PEAR_Common extends PEAR if ($callback) { call_user_func($callback, 'done', $bytes); } - // callback: done! return $dest_file; }