diff options
author | mcq8 <php@mcq8.be> | 2014-11-01 04:32:18 +0100 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2014-11-30 16:38:13 -0800 |
commit | 6eaa4d01d35e44374e8d7ba930fc25f7abbb434f (patch) | |
tree | d213e444146b27a150067f4e4703a18d02a907a4 /main/streams/plain_wrapper.c | |
parent | 40e518b4c357efb193e42bacb7ade2858abad543 (diff) | |
download | php-git-6eaa4d01d35e44374e8d7ba930fc25f7abbb434f.tar.gz |
Fix bug #68335: rmdir doesnt work with file:// stream wrapper
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 4b5dc55276..bba22b14dc 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1267,6 +1267,13 @@ static int php_plain_files_mkdir(php_stream_wrapper *wrapper, char *dir, int mod static int php_plain_files_rmdir(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC) { + char *p; + if ((p = strstr(url, "://")) != NULL) { + if (p < strchr(url, '/')) { + url = p + 3; + } + } + #if PHP_WIN32 int url_len = strlen(url); #endif |