Bug #53346
closedExtension upload as zip on Windows systems ignores directories
100%
Description
If I click on "Upload Extension .t3x/.zip" in the extension manager on a windows system (Windows Vista, 32 bit, TYPO3 6.1.5) and upload a zip file, the Extension Manager ignories the directories. The extension directory contains only files after the upload.
The upload of t3x files works without problems.
Updated by Carsten (Aspagon) about 11 years ago
The problem ist caused by the DIRECTORY_SEPARATOR in FileHandlingUtility.php, line 410ff.:
while (($zipEntry = zip_read($zip)) !== FALSE) { if (strpos(zip_entry_name($zipEntry), DIRECTORY_SEPARATOR) !== FALSE) { $last = strrpos(zip_entry_name($zipEntry), DIRECTORY_SEPARATOR); $dir = substr(zip_entry_name($zipEntry), 0, $last); $file = substr(zip_entry_name($zipEntry), strrpos(zip_entry_name($zipEntry), DIRECTORY_SEPARATOR) + 1); ...
"zip_entry_name($zipEntry)" returns for example "Classes/Controller/DummyController.php", but DIRECTORY_SEPARATOR returns "\" (Windows).
DIRECTORY_SEPARATOR should be replaced with '/'.
Please also take a look at: http://alanhogan.com/tips/php/directory-separator-not-necessary
Updated by Gerrit Code Review almost 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26911
Updated by Wouter Wolters over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c43e60e99339a65fb1ccebfc0087f570b26b48f8.