svn: /pear/pear-core/trunk/PEAR/Command/ Package.php

[email protected] (Helgi Þormar Þorbjörnsson) Sun, 12 Sep 2010 12:17:01 +0000
Newsgroups php.pear.cvs,php.pear.core
Message-ID <[email protected]>
dufuz                                    Sun, 12 Sep 2010 12:17:01 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303291

Log:
Sprinkle in a few more DIRECTORY_SEPARATOR instead of using /

Changed paths:
    U   pear/pear-core/trunk/PEAR/Command/Package.php

Modified: pear/pear-core/trunk/PEAR/Command/Package.php
===================================================================
--- pear/pear-core/trunk/PEAR/Command/Package.php	2010-09-12 12:14:59 UTC (rev 303290)
+++ pear/pear-core/trunk/PEAR/Command/Package.php	2010-09-12 12:17:01 UTC (rev 303291)
@@ -481,8 +481,8 @@
         }

         // Check if tag already exists
-        $releaseTag = $path['local']['base'] . 'tags/' . $svntag;
-        $existsCommand = 'svn ls ' . $path['base'] . 'tags/';
+        $releaseTag = $path['local']['base'] . 'tags' . DIRECTORY_SEPARATOR . $svntag;
+        $existsCommand = 'svn ls ' . $path['base'] . 'tags' . DIRECTORY_SEPARATOR;

         $fp = popen($existsCommand, "r");
         $out = '';
@@ -491,7 +491,7 @@
         }
         pclose($fp);

-        if (in_array($svntag . '/', explode("\n", $out))) {
+        if (in_array($svntag . DIRECTORY_SEPARATOR, explode("\n", $out))) {
             $this->ui->outputData($this->output, $command);
             return $this->raiseError('SVN tag ' . $svntag . ' for ' . $package . ' already exists.');
         } elseif (file_exists($path['local']['base'] . 'tags') === false) {
@@ -521,7 +521,7 @@
         $command .= ' copy --parents ';

         $dir   = dirname($packageFile);
-        $dir   = substr($dir, strrpos($dir, '/') + 1);
+        $dir   = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1);
         $files = array_keys($info->getFilelist());
         if (!in_array(basename($packageFile))) {
             $files[] = basename($packageFile);
@@ -605,7 +605,7 @@
         $command .= ' -m "Removing tag for the ' . $version  . ' release."';

         $path = $this->_svnFindPath($packageFile);
-        $command .= ' ' . $path['base'] . 'tags/' . $tag;
+        $command .= ' ' . $path['base'] . 'tags' . DIRECTORY_SEPARATOR . $tag;


         if ($this->config->get('verbose') > 1) {