php_url_free(resource);
return NULL;
} else if (entry && entry->is_dir) {
- /*if (entry->is_mounted) {
- external directory, TODO: construct an internal dirstream based on this actual dir's dirstream
+ if (entry->is_mounted) {
php_url_free(resource);
return php_stream_opendir(entry->tmp, options, context);
- }*/
+ }
internal_file = estrdup(internal_file);
php_url_free(resource);
return phar_make_dirstream(internal_file, &phar->manifest TSRMLS_CC);
efree(arch);
#endif
zend_bailout();
- return PHAR_MIME_PHPS;
case PHAR_MIME_OTHER:
/* send headers, output file contents */
efree(basename);
phar_entry_delref(phar TSRMLS_CC);
zend_bailout();
- return PHAR_MIME_OTHER;
case PHAR_MIME_PHP:
if (basename) {
phar_mung_server_vars(arch, entry, entry_len, basename, basename_len, ru, ru_len TSRMLS_CC);
--FILE--
<?php
$fname = dirname(__FILE__) . '/tempmanifest1.phar.php';
+$pname = 'phar://' . $fname;
+
$a = new Phar($fname);
$a['index.php'] = '<?php
Phar::mount("testit", dirname(Phar::running(0)) . "/testit");
?>');
include dirname(__FILE__) . '/testit/extfile.php';
include $fname;
+
+$a = opendir($pname . '/testit');
+$out = array();
+while (false !== ($b = readdir($a))) {
+ $out[] = $b;
+}
+sort($out);
+foreach ($out as $b) {
+ echo "$b\n";
+}
+$out = array();
+foreach (new Phar($pname . '/testit') as $b) {
+ $out[] = $b->getPathName();
+}
+sort($out);
+foreach ($out as $b) {
+ echo "$b\n";
+}
?>
===DONE===
--CLEAN--
string(%d) "%sextfile.php"
string(%d) "phar://%sextfile.php"
string(%d) "phar://%sextfile2.php"
+.
+..
+extfile.php
+extfile2.php
+phar://%stempmanifest1.phar.php/testit%cextfile.php
+phar://%stempmanifest1.phar.php/testit%cextfile2.php
===DONE===
\ No newline at end of file