]> granicus.if.org Git - php/commitdiff
support file:/// under windows again
authorRob Richards <rrichards@php.net>
Thu, 11 Nov 2004 13:09:03 +0000 (13:09 +0000)
committerRob Richards <rrichards@php.net>
Thu, 11 Nov 2004 13:09:03 +0000 (13:09 +0000)
main/streams/streams.c

index a8f010605b887b4d69c758ab8ee7fc64ab8803b8..7692005743e2cc8c3d38e94b30fc9510e2d163dc 100755 (executable)
@@ -1467,7 +1467,7 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char
        /* TODO: curl based streams probably support file:// properly */
        if (!protocol || !strncasecmp(protocol, "file", n))     {
 #ifdef PHP_WIN32
-               if (protocol && path[n+1] == '/' && path[n+2] == '/' && path[n+4] != ':')       {
+               if (protocol && path[n+1] == '/' && path[n+2] == '/' && path[n+3] != '\0' && path[n+3] != '/' && path[n+4] != ':')      {
 #else
                if (protocol && path[n+1] == '/' && path[n+2] == '/' && path[n+3] != '/')       {
 #endif