ID: 49190 Updated by: cel...@php.net Reported By: alexander dot wahl at netclusive dot com -Status: Open +Status: Bogus Bug Type: PHAR related Operating System: Linux 2.6.26-2-amd64 PHP Version: 5.3.0 New Comment:
<?php try { $oTarPhar = new PharData(realpath('test.one.two.tar'), Phar::NONE, '.tar'); $oTarPhar->convertToExecutable(Phar::PHAR, Phar::NONE, '.one.two.phar'); } catch (Exception $e) { echo $e->getMessage(); } ?> will do what you desire. Previous Comments: ------------------------------------------------------------------------ [2009-08-07 14:26:50] alexander dot wahl at netclusive dot com email typo ------------------------------------------------------------------------ [2009-08-07 14:25:44] alexander dot wahl at netlusive dot com email typo ------------------------------------------------------------------------ [2009-08-07 14:23:26] alexander dot wahl at netclusive dot com Description: ------------ PharData::convertToExecutable does not recognize filenames with multiple dots, while creating the new archive. Everything from the first dot is ignored. Reproduce code: --------------- <?php try { $oTarPhar = new PharData(realpath('test.one.two.tar'), Phar::NONE, '.tar'); $oTarPhar->convertToExecutable(Phar::PHAR, Phar::NONE, '.phar'); } catch (Exception $e) { echo $e->getMessage(); } ?> Expected result: ---------------- A new PHAR archive with the expected filename: test.one.two.phar Actual result: -------------- A new PHAR archive with the filename: test.phar ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49190&edit=1