Actions
Bug #53740
closedExtension ZIP Upload doesn't extract directories on Windows
Start date:
2013-11-18
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
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
Actions