summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)