cvs: pecl /phar dirstream.c /phar/tests 027.phpt
| From: | Greg Beaver | Date: | Sun, 13 Apr 2008 23:57:43 +0000 |
| Subject: | cvs: pecl /phar dirstream.c /phar/tests 027.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-10366@lists.php.net to get a copy of this message | ||
cellog Sun Apr 13 23:57:43 2008 UTC
Modified files:
/pecl/phar dirstream.c
/pecl/phar/tests 027.phpt
Log:
add fstat to 027 test. Remove phar_dir_stat, stat should not be possible on a dir handle
http://cvs.php.net/viewvc.cgi/pecl/phar/dirstream.c?r1=1.16&r2=1.17&diff_format=u
Index: pecl/phar/dirstream.c
diff -u pecl/phar/dirstream.c:1.16 pecl/phar/dirstream.c:1.17
--- pecl/phar/dirstream.c:1.16 Sun Apr 13 23:47:14 2008
+++ pecl/phar/dirstream.c Sun Apr 13 23:57:43 2008
@@ -34,7 +34,7 @@
"phar dir",
phar_dir_seek, /* seek */
NULL, /* cast */
- phar_dir_stat, /* stat */
+ NULL, /* stat */
NULL, /* set option */
};
@@ -136,23 +136,6 @@
/* }}} */
/**
- * Stat a dir in a phar
- */
-static int phar_dir_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */
-{
- phar_entry_data *data = (phar_entry_data *)stream->abstract;
-
- /* If ssb is NULL then someone is misbehaving */
- if (!ssb) {
- return -1;
- }
-
- phar_dostat(data->phar, data->internal_file, ssb, 0, data->phar->alias,
data->phar->alias_len TSRMLS_CC);
- return 0;
-}
-/* }}} */
-
-/**
* add an empty element with a char * key to a hash table, avoiding duplicates
*
* This is used to get a unique listing of virtual directories within a phar,
http://cvs.php.net/viewvc.cgi/pecl/phar/tests/027.phpt?r1=1.11&r2=1.12&diff_format=u
Index: pecl/phar/tests/027.phpt
diff -u pecl/phar/tests/027.phpt:1.11 pecl/phar/tests/027.phpt:1.12
--- pecl/phar/tests/027.phpt:1.11 Sun Apr 13 23:48:45 2008
+++ pecl/phar/tests/027.phpt Sun Apr 13 23:57:43 2008
@@ -48,6 +48,7 @@
var_dump(fseek($a, 1), ftell($a));
echo "fwrite on dir handle\n";
var_dump(fwrite($a, 'hi'));
+var_dump(fstat($a));
closedir($a);
?>
===DONE===
@@ -77,4 +78,5 @@
int(1)
fwrite on dir handle
int(0)
+bool(false)
===DONE===