go to bug id or search bugs for
You may use ZipArchive->addEmptyDir to add a folder in a parent directory without renaming it. You can then extract using ZipArchive and the folder will be recreated in the parent folders of the destination.
$archive = new ZipArchive();
$archive2 = new ZipArchive();
An error. The ZIP file should not be created.
It should silently succeed. The folder "down" should not be created.
The file "a.zip" was created. During extraction, the folder "down" was created in the grandfather directory.
Add a Patch
Add a Pull Request
That's what I read in http://www.pkware.com/documents/casestudies/APPNOTE.TXT chapter 4.4.17:
"126.96.36.199 The name of the file, with optional relative path.
The path stored MUST not contain a drive or
device letter, or a leading slash. All slashes
MUST be forward slashes '/' as opposed to
backwards slashes '\' for compatibility with Amiga
and UNIX file systems etc. If input came from standard
input, there is no file name field. "
Thus the current behavior is valid. You can use chdir() to achieve the result you've described.