]> 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:59 +0000 (17:03 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 23 Jan 2007 17:03:59 +0000 (17:03 +0000)
TSRM/tsrm_virtual_cwd.c

index 0c7dc6d3f40b36de0d82fa741350d29f8520a346..d91f8ff6099924b12e9c608bcaf0f3b42644b9d5 100644 (file)
@@ -647,6 +647,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