Commit:    4356cbc66627a32796ea7de354565cad9b04fcc1
Author:    Anatol Belski <[email protected]>         Tue, 1 Oct 2013 13:47:30 +0200
Parents:   6d48676881a734315edc8503491347de0f08e9be
Branches:  master

Link:       
http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=4356cbc66627a32796ea7de354565cad9b04fcc1

Log:
preffer bsdtar over gnu tar

Changed paths:
  M  client/include/PeclExt.php


Diff:
diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php
index 6cac35c..14e688b 100644
--- a/client/include/PeclExt.php
+++ b/client/include/PeclExt.php
@@ -207,12 +207,13 @@ class PeclExt
                        }
                }
 
-               /* try gnu tar first */
-               $tar_cmd = $this->tar_cmd . ' --no-same-owner 
--no-same-permissions -xf ' . escapeshellarg($tar_name);
+               /* try with bsdtar first */
+               $tar_cmd = $this->bsdtar_cmd . ' -xf ' . 
escapeshellarg($tar_name);
                system($tar_cmd, $ret);
                if ($ret) {
-                       /* not done yet, retry with bsdtar */
-                       $tar_cmd = $this->bsdtar_cmd . ' -xf ' . 
escapeshellarg($tar_name);
+                       /* no fail yet, retry with gnu tar */
+                       $tar_opts = ' --no-same-owner --no-same-permissions -xf 
';
+                       $tar_cmd = $this->tar_cmd . $tar_opts . 
escapeshellarg($tar_name);
                        system($tar_cmd, $ret);
                        if ($ret) {
                                /* definitely broken, give up */


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to