From: mcq8 Date: Sat, 1 Nov 2014 03:32:18 +0000 (+0100) Subject: Fix bug #68335: rmdir doesnt work with file:// stream wrapper X-Git-Tag: PRE_NATIVE_TLS_MERGE~108^2~1^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eaa4d01d35e44374e8d7ba930fc25f7abbb434f;p=php Fix bug #68335: rmdir doesnt work with file:// stream wrapper --- 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