php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49190 PharData::convertToExecutable does not recognize filenames with multiple dots
Submitted: 2009-08-07 14:23 UTC Modified: 2009-09-05 21:58 UTC
From: alexander dot wahl at netclusive dot com Assigned:
Status: Not a bug Package: PHAR related
PHP Version: 5.3.0 OS: Linux 2.6.26-2-amd64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexander dot wahl at netclusive dot com
New email:
PHP Version: OS:

 

 [2009-08-07 14:23 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-07 14:25 UTC] alexander dot wahl at netlusive dot com
email typo
 [2009-08-07 14:26 UTC] alexander dot wahl at netclusive dot com
email typo
 [2009-09-05 21:58 UTC] cellog@php.net
<?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.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 21:01:30 2024 UTC