php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71555 phardata.compress removes same name files in tar archive
Submitted: 2016-02-09 07:51 UTC Modified: -
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: fredrik dot e at gmail dot com Assigned:
Status: Open Package: PHAR related
PHP Version: 5.5.32 OS:
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: fredrik dot e at gmail dot com
New email:
PHP Version: OS:

 

 [2016-02-09 07:51 UTC] fredrik dot e at gmail dot com
Description:
------------
I just realized that phardata.compress removes same name files in tar archives.

I have multiple tar archives that contains multiple instances of files with the same name and when using the code below only the first occurrence of the file is preserved.

Test script:
---------------
<?php
  $p = new PharData('tarFile.tar',0);
  $p->compress(Phar::GZ);
?>

Expected result:
----------------
The expected result is to preserve all files in the archive and just compress it.

Actual result:
--------------
Only first file (with the same name) is preserved.

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Sep 18 07:02:04 2020 UTC