Project

General

Profile

Actions

Bug #53740

closed

Extension ZIP Upload doesn't extract directories on Windows

Added by Alexander Buchholtz over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
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

  1. Install Xampp 1.8.2 for Windows
  2. Install TYPO3 6.1.5 Introduction Package
  3. 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/
  4. Log in TYPO3 as administrator
  5. Go to Extension Manager
  6. Click on "Upload extension .t3x/.zip" button
  7. Select the previously downloaded ZIP archive
  8. Verify that a message appears confirming the successful installation
  9. Verify in the local file system that the sub-directories contained in the ZIP archive are not extracted at /typo3conf/ext/l10nmgr/
  10. 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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #52178: .zip - Extension Upload failedClosedXavier Perseguers2013-09-22

Actions
Is duplicate of TYPO3 Core - Bug #53346: Extension upload as zip on Windows systems ignores directoriesClosed2013-11-05

Actions
Actions #1

Updated by Markus Klein over 10 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?

Actions #2

Updated by Gerrit Code Review over 10 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

Actions #3

Updated by Wouter Wolters about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF