summaryrefslogtreecommitdiff
path: root/main/streams/plain_wrapper.c
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2003-11-28 23:25:28 +0000
committerSara Golemon <pollita@php.net>2003-11-28 23:25:28 +0000
commit026d4c9e4cec8cb3f03c311b90f05241f2d70455 (patch)
treee563b6f3699eb94168362c8f00fb1c4d80506e7a /main/streams/plain_wrapper.c
parent6d86bb9e40386e4127af4f55b8e8e79864255ca1 (diff)
downloadphp-git-026d4c9e4cec8cb3f03c311b90f05241f2d70455.tar.gz
Route php_stat() via streams/url_stat API (php_stream_stat_path).
This enables fopen-wrappers support on stat() and related family calls.
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r--main/streams/plain_wrapper.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 1f060ec666..b78c2d9651 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -896,9 +896,14 @@ static php_stream *php_plain_files_stream_opener(php_stream_wrapper *wrapper, ch
return php_stream_fopen_rel(path, mode, opened_path, options);
}
-static int php_plain_files_url_stater(php_stream_wrapper *wrapper, char *url, php_stream_statbuf *ssb TSRMLS_DC)
+static int php_plain_files_url_stater(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC)
{
- return VCWD_STAT(url, &ssb->sb);
+#ifdef HAVE_SYMLINK
+ if (flags & PHP_STREAM_URL_STAT_LINK) {
+ return VCWD_LSTAT(url, &ssb->sb);
+ } else
+#endif
+ return VCWD_STAT(url, &ssb->sb);
}
static int php_plain_files_unlink(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC)