Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Creating Zip Archive in windows and extracting in linux in Zend/Filter/Compress/Zip.php #5660

@Exlord

Description

@Exlord

The compress function for Zip (library/Zend/Filter/Compress/Zip.php:108) uses the DIRECTORY_SEPARATOR witch in normal usage is fine but when zip file is created in windows and extracted in linux file patches are messed up.
for example i have a directory structure like this :
dir1/
--file1
--dir2/
----file2
if this directory compressed in windows and extracted in linux i get :
2 directory and 2 files all in the root with names like below

dir1
dir1\file1
dir1\dir2
dir1\dir2\file2

note that dir1\file1 is not a path but the actual file name

the simplest solution would be to use / instead of the DIRECTORY_SEPARATOR or provide on option that the user can set the character for directory separator manually

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions