summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2007-11-22 18:30:03 +0000
committerGreg Beaver <cellog@php.net>2007-11-22 18:30:03 +0000
commit37890255fa53327f43a74818876285c9b99f3222 (patch)
treec1c0cbc6cfb43a83ff37e12f7176fa679f37afb1
parent1eba759f3bb2285d6a066fb6dd1165d7868590ff (diff)
downloadphp-git-37890255fa53327f43a74818876285c9b99f3222.tar.gz
fix Bug #12491 filenew incorrectly creates file path [cellog]
-rw-r--r--ext/phar/package.php1
-rwxr-xr-xext/phar/phar/clicommand.inc3
2 files changed, 4 insertions, 0 deletions
diff --git a/ext/phar/package.php b/ext/phar/package.php
index 21f85eecb1..ae84690a8e 100644
--- a/ext/phar/package.php
+++ b/ext/phar/package.php
@@ -6,6 +6,7 @@ $notes = '
* fix creation and read of Phar objects on Windows, manage
windows path separators (on windows only)
* fix Bug #11950: make pharcmd use installed phar.so, not build one [remicollet]
+ * fix Bug #12491: filenew incorrectly creates file path [cellog]
';
if (!class_exists("Phar") && !extension_loaded("Phar")) {
diff --git a/ext/phar/phar/clicommand.inc b/ext/phar/phar/clicommand.inc
index 455dfa4446..3b96910e24 100755
--- a/ext/phar/phar/clicommand.inc
+++ b/ext/phar/phar/clicommand.inc
@@ -215,6 +215,9 @@ abstract class CLICommand
{
$d = dirname($arg);
$f = realpath($d);
+ if ($d === '.') {
+ $d = '';
+ }
if ($f === false) {
self::error("Path for file '$arg' does not exist.\n");