Project

General

Profile

Actions

Bug #53346

closed

Extension upload as zip on Windows systems ignores directories

Added by Carsten (Aspagon) over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extension Manager
Target version:
Start date:
2013-11-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #53740: Extension ZIP Upload doesn't extract directories on WindowsClosed2013-11-18

Actions
Actions #1

Updated by Carsten (Aspagon) over 10 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

Actions #2

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

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