summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2007-11-22 18:32:28 +0000
committerGreg Beaver <cellog@php.net>2007-11-22 18:32:28 +0000
commit64f2e01d537285836ad236993c79401b349aa125 (patch)
tree2540573bf105c33012409a02b388eb118b271846 /ext/phar
parent37890255fa53327f43a74818876285c9b99f3222 (diff)
downloadphp-git-64f2e01d537285836ad236993c79401b349aa125.tar.gz
fix Bug #12492 filenew incorrectly creates file path [urkle]
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/package.php2
-rwxr-xr-xext/phar/phar/clicommand.inc5
2 files changed, 2 insertions, 5 deletions
diff --git a/ext/phar/package.php b/ext/phar/package.php
index ae84690a8e..69672f92c8 100644
--- a/ext/phar/package.php
+++ b/ext/phar/package.php
@@ -6,7 +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]
+ * fix Bug #12492: filenew incorrectly creates file path [urkle]
';
if (!class_exists("Phar") && !extension_loaded("Phar")) {
diff --git a/ext/phar/phar/clicommand.inc b/ext/phar/phar/clicommand.inc
index 3b96910e24..84369a6b6f 100755
--- a/ext/phar/phar/clicommand.inc
+++ b/ext/phar/phar/clicommand.inc
@@ -215,14 +215,11 @@ 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");
}
- return $f . substr($arg, strlen($d));;
+ return $f . basename($arg);
}
static function cli_arg_typ_filecont($arg, $cfg, $key)