]> granicus.if.org Git - php/commitdiff
Fixed wrong realpath() result for unexistent files on win32
authorDmitry Stogov <dmitry@php.net>
Tue, 23 Jan 2007 17:03:48 +0000 (17:03 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 23 Jan 2007 17:03:48 +0000 (17:03 +0000)
TSRM/tsrm_virtual_cwd.c

index 36bce0b5e969ee93fbe2859723327d66ef8d8355..33285bab09cdb65a4a6c3ffafe4946e76d35ca09 100644 (file)
@@ -648,6 +648,11 @@ no_realpath:
                                                memcpy(&state->cwd[state->cwd_length], data.cFileName, length+1);
                                                ptr_length = length;
                                                FindClose(hFind);
+                                       } else if (use_realpath == CWD_REALPATH) {
+                                               free(free_path);
+                                               CWD_STATE_FREE(state);
+                                               *state = old_state;                                     
+                                               return 1;
                                        }
                                }
 #endif