1--TEST-- 2Phar: Bug #46060: addEmptyDir() breaks 3--EXTENSIONS-- 4phar 5--SKIPIF-- 6<?php if (getenv('SKIP_SLOW_TESTS')) die('skip'); ?> 7--INI-- 8phar.require_hash=0 9--FILE-- 10<?php 11$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; 12$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.tar'; 13 14$phar = new PharData($fname); 15$phar->addEmptyDir('blah/'); 16$phar->addFromString('test/', ''); 17 18copy($fname, $fname2); 19$phar = new PharData($fname2); 20 21var_dump($phar['blah']->isDir(), $phar['test']->isDir()); 22?> 23--CLEAN-- 24<?php 25unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); 26unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); 27__HALT_COMPILER(); 28?> 29--EXPECT-- 30bool(true) 31bool(false) 32