com php-src: Fix bug #68335: rmdir doesnt work with file:// stream wrapper: main/streams/plain_wrapper.c

From: Date: Mon, 01 Dec 2014 00:38:13 +0000
Subject: com php-src: Fix bug #68335: rmdir doesnt work with file:// stream wrapper: main/streams/plain_wrapper.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83398@lists.php.net to get a copy of this message
Commit: 6eaa4d01d35e44374e8d7ba930fc25f7abbb434f Author: mcq8 <php@mcq8.be> Sat, 1 Nov 2014 04:32:18 +0100 Committer: Stanislav Malyshev <stas@php.net> Sun, 30 Nov 2014 16:38:13 -0800 Parents: 40e518b4c357efb193e42bacb7ade2858abad543 Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6eaa4d01d35e44374e8d7ba930fc25f7abbb434f Log: Fix bug #68335: rmdir doesnt work with file:// stream wrapper Bugs: https://bugs.php.net/68335 Changed paths: M main/streams/plain_wrapper.c Diff: diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 4b5dc55..bba22b1 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

« previous php.cvs (#83398) next »