#else
char *fname, *alias = NULL, *error, *arch = NULL, *entry = NULL, *save_fname;
int fname_len, alias_len = 0, arch_len, entry_len, is_data;
- long flags = SPL_FILE_DIR_SKIPDOTS, format = 0;
+ long flags = SPL_FILE_DIR_SKIPDOTS|SPL_FILE_DIR_UNIXPATHS, format = 0;
phar_archive_object *phar_obj;
phar_archive_data *phar_data;
zval *zobj = getThis(), arg1, arg2;
INIT_PZVAL(&arg);
ZVAL_STRINGL(&arg, dir, dir_len, 0);
INIT_PZVAL(&arg2);
- ZVAL_LONG(&arg2, SPL_FILE_DIR_SKIPDOTS);
+ ZVAL_LONG(&arg2, SPL_FILE_DIR_SKIPDOTS|SPL_FILE_DIR_UNIXPATHS);
zend_call_method_with_2_params(&iter, spl_ce_RecursiveDirectoryIterator,
&spl_ce_RecursiveDirectoryIterator->constructor, "__construct", NULL, &arg, &arg2);
string(1) "d"
string(9) "index.php"
string(7) "web.php"
-string(%d) "phar://%snophar.phar%cb%cc.php"
-string(%d) "phar://%snophar.phar%cd"
-string(%d) "phar://%snophar.phar%cindex.php"
-string(%d) "phar://%snophar.phar%cweb.php"
+string(%d) "phar://%snophar.phar/b/c.php"
+string(%d) "phar://%snophar.phar/d"
+string(%d) "phar://%snophar.phar/index.php"
+string(%d) "phar://%snophar.phar/web.php"
bool(true)
bool(false)
bool(false)
directory
extfile.php
extfile2.php
-phar://%stempmanifest1.phar.php/testit%cdirectory
-phar://%stempmanifest1.phar.php/testit%cextfile.php
-phar://%stempmanifest1.phar.php/testit%cextfile2.php
+phar://%stempmanifest1.phar.php/testit/directory
+phar://%stempmanifest1.phar.php/testit/extfile.php
+phar://%stempmanifest1.phar.php/testit/extfile2.php
Mounting of /testit to another\..\mistake within phar %stempmanifest1.phar.php failed
Mounting of /notfound to %stests/this/does/not/exist within phar %stempmanifest1.phar.php failed
Mounting of /testit to %stests within phar %stests/tempmanifest1.phar.php failed
__halt_compiler();
?>
--EXPECTF--
-string(%d) "phar://%sphar_dir_iterate.phar.php%canother.file.txt"
-string(%d) "phar://%sphar_dir_iterate.phar.php%csub%ctop.txt"
-string(%d) "phar://%sphar_dir_iterate.phar.php%ctop.txt"
+string(%d) "phar://%sphar_dir_iterate.phar.php/another.file.txt"
+string(%d) "phar://%sphar_dir_iterate.phar.php/sub/top.txt"
+string(%d) "phar://%sphar_dir_iterate.phar.php/top.txt"
===DONE===
$a->extractTo(dirname(__FILE__) . '/extract', 'mount');
$a->extractTo(dirname(__FILE__) . '/extract');
$out = array();
-foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract', 0x00001000), RecursiveIteratorIterator::CHILD_FIRST) as $p => $b) {
+foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $p => $b) {
$out[] = $p;
}
sort($out);
@rmdir($e);
?>
--EXPECTF--
-%sextract%cfile1.txt
-%sextract%cfile2.txt
-%sextract%cone
-%sextract%csubdir
-%sextract%csubdir%cectory
-%sextract%csubdir%cectory%cfile.txt
+%sextract/file1.txt
+%sextract/file2.txt
+%sextract/one
+%sextract/subdir
+%sextract/subdir/ectory
+%sextract/subdir/ectory/file.txt
string(2) "hi"
string(3) "hi3"
string(3) "hi2"
$phar->extractTo(dirname(__FILE__) . '/extract');
$out = array();
-foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract', 0x00001000), RecursiveIteratorIterator::CHILD_FIRST) as $path => $file) {
+foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $path => $file) {
$extracted[] = $path;
}
@rmdir($dir);
?>
--EXPECTF--
-%sextract%cfile1.txt
-%sextract%cfile2.txt
-%sextract%cone
-%sextract%csubdir
-%sextract%csubdir%cectory
-%sextract%csubdir%cectory%cfile.txt
+%sextract/file1.txt
+%sextract/file2.txt
+%sextract/one
+%sextract/subdir
+%sextract/subdir/ectory
+%sextract/subdir/ectory/file.txt
===DONE===
?>
--EXPECTF--
Invalid argument, %sfiles/bogus.zip cannot be found
-phar://%sfiles/notbogus.zip%cnonsense.txt
-phar://%sfiles/notbogus.zip%cstuff.txt
+phar://%sfiles/notbogus.zip/nonsense.txt
+phar://%sfiles/notbogus.zip/stuff.txt
===DONE===
__halt_compiler();
?>
--EXPECTF--
-string(42) "phar://*/files/phar_oo_test.phar.php%ca.php"
+string(42) "phar://*/files/phar_oo_test.phar.php/a.php"
string(5) "a.php"
int(32)
string(4) "file"
int(%d)
int(%d)
int(%d)
-string(38) "phar://*/files/phar_oo_test.phar.php%cb"
+string(38) "phar://*/files/phar_oo_test.phar.php/b"
string(1) "b"
int(0)
string(3) "dir"
int(%d)
int(%d)
int(%d)
-string(42) "phar://*/files/phar_oo_test.phar.php%cb.php"
+string(42) "phar://*/files/phar_oo_test.phar.php/b.php"
string(5) "b.php"
int(32)
string(4) "file"
int(%d)
int(%d)
int(%d)
-string(42) "phar://*/files/phar_oo_test.phar.php%ce.php"
+string(42) "phar://*/files/phar_oo_test.phar.php/e.php"
string(5) "e.php"
int(32)
string(4) "file"
int(%d)
int(%d)
==RECURSIVE==
-string(42) "phar://*/files/phar_oo_test.phar.php%ca.php"
+string(42) "phar://*/files/phar_oo_test.phar.php/a.php"
string(5) "a.php"
int(32)
bool(false)
NULL
int(0)
-string(44) "phar://*/files/phar_oo_test.phar.php%cb%cc.php"
+string(44) "phar://*/files/phar_oo_test.phar.php/b/c.php"
string(5) "c.php"
int(34)
bool(false)
NULL
int(0)
-string(44) "phar://*/files/phar_oo_test.phar.php%cb%cd.php"
+string(44) "phar://*/files/phar_oo_test.phar.php/b/d.php"
string(5) "d.php"
int(34)
bool(false)
NULL
int(0)
-string(42) "phar://*/files/phar_oo_test.phar.php%cb.php"
+string(42) "phar://*/files/phar_oo_test.phar.php/b.php"
string(5) "b.php"
int(32)
bool(false)
NULL
int(0)
-string(42) "phar://*/files/phar_oo_test.phar.php%ce.php"
+string(42) "phar://*/files/phar_oo_test.phar.php/e.php"
string(5) "e.php"
int(32)
bool(false)
?>
===DONE===
--EXPECTF--
-phar://%sodt.odt%cConfigurations2%caccelerator%ccurrent.xml
-phar://%sodt.odt%cMETA-INF%cmanifest.xml
-phar://%sodt.odt%cThumbnails%cthumbnail.png
-phar://%sodt.odt%ccontent.xml
-phar://%sodt.odt%cmeta.xml
-phar://%sodt.odt%cmimetype
-phar://%sodt.odt%csettings.xml
-phar://%sodt.odt%cstyles.xml
+phar://%sodt.odt/Configurations2/accelerator/current.xml
+phar://%sodt.odt/META-INF/manifest.xml
+phar://%sodt.odt/Thumbnails/thumbnail.png
+phar://%sodt.odt/content.xml
+phar://%sodt.odt/meta.xml
+phar://%sodt.odt/mimetype
+phar://%sodt.odt/settings.xml
+phar://%sodt.odt/styles.xml
Cannot create phar '%sodt.odt', file extension (or combination) not recognised
===DONE===
?>
===DONE===
--EXPECTF--
-dir phar://%s/zip.zip%cempty
-phar://%s/zip.zip%chi.txt
+dir phar://%s/zip.zip/empty
+phar://%s/zip.zip/hi.txt
hi there
-dir phar://%s/zip.zip%cnotempty
+dir phar://%s/zip.zip/notempty
phar://%s/zip.zip/notempty/hi.txt
===DONE===