]> granicus.if.org Git - php/commitdiff
* use new Archive_Tar gzip autodetection
authorStig Bakken <ssb@php.net>
Mon, 27 May 2002 21:36:28 +0000 (21:36 +0000)
committerStig Bakken <ssb@php.net>
Mon, 27 May 2002 21:36:28 +0000 (21:36 +0000)
pear/PEAR/Common.php

index f244a0366060da0c230b9d4a0b9dab7953eb884b..2e33375d633eaab52ecb2c692fd394824d6e2022 100644 (file)
@@ -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;
     }