Bug #53740
closedExtension ZIP Upload doesn't extract directories on Windows
100%
Description
Step by Step
- Install Xampp 1.8.2 for Windows
- Install TYPO3 6.1.5 Introduction Package
- Manually download any extension in ZIP-format from TER that has sub-directories e.g. http://typo3.org/extensions/repository/download/l10nmgr/3.4.0/zip/
- Log in TYPO3 as administrator
- Go to Extension Manager
- Click on "Upload extension .t3x/.zip" button
- Select the previously downloaded ZIP archive
- Verify that a message appears confirming the successful installation
- Verify in the local file system that the sub-directories contained in the ZIP archive are not extracted at /typo3conf/ext/l10nmgr/
- Verify in the TYPO3 logs that all directories and files contained in these directories are reported as an error, e.g.: Core: Error handler (BE): PHP Warning: fopen(C:/xampp/htdocs/typo3/typo3conf/ext/l10nmgr/views/class.tx_l10nmgr_l10nHTMLListView.php): failed to open stream: No such file or directory in C:\xampp\htdocs\typo3\typo3\sysext\core\Classes\Utility\GeneralUtility.php line 2472
The issue was already reported on the dev list (http://lists.typo3.org/pipermail/typo3-dev/2013-November/047680.html) as well as a comment by Lukas Schnabel in issue #52178
My OS: Windows 7 SP1
The problem lies in TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility.php:411
if (strpos(zip_entry_name($zipEntry), DIRECTORY_SEPARATOR) !== FALSE) {
where the zip entry name is returned with a forward slash as where the DIRECTORY SEPARATOR is set by PHP to a backslash. Therefore the sub-directories are never created and writing the files fails with an error.
Thanks,
Alexander
Updated by Markus Klein about 11 years ago
- Status changed from New to Accepted
- Target version set to next-patchlevel
Alexander, thanks for the detailed report. Can you push a suggested and tested patch to Gerrit?
Updated by Gerrit Code Review almost 11 years ago
- Status changed from Accepted 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.