From: Steph Fox Date: Sat, 24 May 2008 13:13:47 +0000 (+0000) Subject: "We shouldn't need a full path to the mount" X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~159 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51967b91d50905de072646e0fc90e16c061e5086;p=php "We shouldn't need a full path to the mount" - Fixed under Windows, cleaned up test --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index f7f4f80728..8f0a3f90e9 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -456,6 +456,10 @@ PHP_METHOD(Phar, mount) fname = zend_get_executed_filename(TSRMLS_C); fname_len = strlen(fname); +#ifdef PHP_WIN32 + phar_unixify_path_separators(fname, fname_len); +#endif + if (fname_len > 7 && !memcmp(fname, "phar://", 7) && SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 2, 0 TSRMLS_CC)) { efree(entry); entry = NULL; diff --git a/ext/phar/tests/config.xml b/ext/phar/tests/config.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ext/phar/tests/files/blog.phar b/ext/phar/tests/files/blog.phar index 16f8f7d590..58c8a3bca7 100644 Binary files a/ext/phar/tests/files/blog.phar and b/ext/phar/tests/files/blog.phar differ diff --git a/ext/phar/tests/files/blog.phar.inc b/ext/phar/tests/files/blog.phar.inc new file mode 100644 index 0000000000..62d86c5c3f --- /dev/null +++ b/ext/phar/tests/files/blog.phar.inc @@ -0,0 +1,20 @@ +setStub(''); +$phar['index.php'] = ''; +$phar['install.php'] = ''; + +?> diff --git a/ext/phar/tests/files/config.xml b/ext/phar/tests/files/config.xml new file mode 100644 index 0000000000..cf0dbc5cda --- /dev/null +++ b/ext/phar/tests/files/config.xml @@ -0,0 +1,9 @@ + + + + localhost + squirrel + nuts + hoard + + diff --git a/ext/phar/tests/front.phar.phpt b/ext/phar/tests/front.phar.phpt index 83c6a42284..da444e8b17 100644 --- a/ext/phar/tests/front.phar.phpt +++ b/ext/phar/tests/front.phar.phpt @@ -13,4 +13,13 @@ Content-type: text/html --FILE_EXTERNAL-- files/blog.phar --EXPECT-- -string(0) "" \ No newline at end of file +string(167) " + + + localhost + squirrel + nuts + hoard + + +"