|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesziparchive-remove-path-length-option.patch (last revision 2016-06-10 07:57 UTC by namatyage at gmail dot com)Pull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-06-28 16:06 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2016-06-28 16:06 UTC] cmb@php.net
[2019-10-02 13:34 UTC] cmb@php.net
[2019-10-02 13:34 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2019-10-02 13:37 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2020-03-06 09:30 UTC] remi@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ After adding a file by addGlob using add_path and remove_path options, the first character of the filename is stripped in the archive. Test script: --------------- <?php $file = 'foo-bar'; touch($file); $zip = new ZipArchive(); $zip->open('test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); $options = array('add_path' => 'prefix-', 'remove_path' => 'foo-'); $zip->addGlob($file, 0, $options); for($i = 0; $i < $zip->numFiles; $i++) { $sb = $zip->statIndex($i); echo $sb['name']; } $zip->close(); Expected result: ---------------- prefix-bar Actual result: -------------- prefix-ar