]> granicus.if.org Git - php/commitdiff
MFB
authorIlia Alshanetsky <iliaa@php.net>
Tue, 10 Dec 2002 16:39:59 +0000 (16:39 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 10 Dec 2002 16:39:59 +0000 (16:39 +0000)
main/streams.c

index eaf9c5b0f6f68cbfb55b259dc4de566b8f6118b2..7c40be6deabd87302dcea1ae3bd5e28d4b3cd6ed 100755 (executable)
@@ -1770,16 +1770,12 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, cha
        if (fp) {
                /* sanity checks for include/require */
                if (options & STREAM_OPEN_FOR_INCLUDE && (fstat(fileno(fp), &st) == -1 || !S_ISREG(st.st_mode))) {
-                       int is_unc = 0;
-
 #ifdef PHP_WIN32
                        /* skip the sanity check; fstat doesn't appear to work on
                         * UNC paths */
-                       is_unc = (filename[0] == '\\' && filename[1] == '\\');
+                       if (!IS_UNC_PATH(filename, strlen(filename)))
 #endif
-                       if (!is_unc) {
                                goto err;
-                       }
                } 
        
                ret = php_stream_fopen_from_file_rel(fp, mode);