mirror of
https://github.com/php/php-src.git
synced 2025-01-18 17:54:05 +08:00
601a77b3a3
recursively
24 lines
477 B
PHP
24 lines
477 B
PHP
--TEST--
|
|
Bug #40228 (extractTo does not create recursive empty path)
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("zip")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
$dest = dirname(__FILE__);
|
|
$arc_name = $dest . "/bug40228.zip";
|
|
$zip = new ZipArchive;
|
|
$zip->open($arc_name, ZIPARCHIVE::CREATE);;
|
|
$zip->extractTo($dest);
|
|
if (is_dir($dest . '/test/empty')) {
|
|
echo "Ok\n";
|
|
rmdir($dest . '/test/empty');
|
|
rmdir($dest . '/test');
|
|
} else {
|
|
echo "Failed.\n";
|
|
}
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECT--
|
|
Ok
|
|
Done
|