]> granicus.if.org Git - php/commitdiff
* use System::mktemp rather than PEAR_Common::mkTempDir
authorStig Bakken <ssb@php.net>
Sun, 7 Jul 2002 20:42:08 +0000 (20:42 +0000)
committerStig Bakken <ssb@php.net>
Sun, 7 Jul 2002 20:42:08 +0000 (20:42 +0000)
pear/PEAR/Packager.php

index c58ce8fab67b69623f322f5e38799cadc3fdb21b..177248d0c098e062ad0b4be3b7d8aeaf4bd23079 100644 (file)
@@ -20,6 +20,7 @@
 // $Id$
 
 require_once 'PEAR/Common.php';
+require_once 'System.php';
 
 /**
  * Administration class used to make a PEAR release tarball.
@@ -101,12 +102,15 @@ class PEAR_Packager extends PEAR_Common
             chdir($oldcwd);
             return $this->raiseError($new_xml);
         }
-        $tmpdir = $this->mkTempDir(getcwd());
+        if (!($tmpdir = System::mktemp('-t '.getcwd().' -d'))) {
+            return $this->raiseError("PEAR_Packager: mktemp failed");
+        }
         $newpkgfile = $tmpdir . DIRECTORY_SEPARATOR . 'package.xml';
         $np = @fopen($newpkgfile, "w");
         if (!$np) {
             chdir($oldcwd);
-            return $this->raiseError("PEAR_Packager: unable to rewrite $pkgfile");
+            system("ls -l ".dirname($newpkgfile));
+            return $this->raiseError("PEAR_Packager: unable to rewrite $pkgfile as $newpkgfile");
         }
         fwrite($np, $new_xml);
         fclose($np);