Bug #71904 [NEW]: Not extracting folder, only contents
From: skrzypecki at gmail dot com
Operating system: Centos
PHP version: 7.0.4
Package: Zip Related
Bug Type: Bug
Bug description:Not extracting folder, only contents
Description:
------------
https://www.reddit.com/r/PHPhelp/comments/4b2go8/zipfile_from_c_behaves_different_in_php55_and/
When creating a zip folder with c#'s ZipFile.CreateFromDirectory(path,
zipPath, CompressionLevel.Optimal, true); we get a zip which contains a
folder.
If this zip is extracted with php55
($zip->extractTo('/my/destination/dir/');), we have the extracted folder
in the location we defined.
But when the zip is extracted with php70 with exactly the same call as
above we dont get the folder in the defined extractTo path, but the
contents in the folder.
So in php77 the folder which is in the zip is skipped and the contents
in the folder is extracted.
The strange thing is that this only happens when using the c# call. So
i'm not sure if it's a php thing or c# thing. When i create a zip with a
folder in the trough 7zip, php70 behaves exactly as expected (which is
what php55 does).
--
Edit bug report at https://bugs.php.net/bug.php?id=71904&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71904&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71904&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71904&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71904&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71904&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71904&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71904&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71904&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71904&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71904&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71904&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71904&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71904&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71904&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71904&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71904&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71904&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71904&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71904&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71904&r=mysqlcfg
Thread (3 messages)
- skrzypecki at gmail dot com