diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-03-27 10:33:40 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-03-27 10:33:40 +0000 |
commit | 862f9ee3d227e75d0c9fa83a3d9b6c60fc9461e3 (patch) | |
tree | 3060773c29bf0ed6aadeb823d7d9d6dc03b64d68 /main/streams/plain_wrapper.c | |
parent | 17d22a50d9f318927bac81c1a33a9700a3ed0fd4 (diff) | |
download | php-git-862f9ee3d227e75d0c9fa83a3d9b6c60fc9461e3.tar.gz |
Added ability to use stream wrappers in include_path
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 484150e2a7..e35ffcb168 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -892,9 +892,13 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, cha } return NULL; } - - if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) == NULL) { - return NULL; + + if (options & STREAM_ASSUME_REALPATH) { + realpath = estrdup(filename); + } else { + if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) == NULL) { + return NULL; + } } if (persistent) { |