From dfa95b718f5a5f54b4145c664283b8bb30b9336c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 23 Jan 2007 17:03:48 +0000 Subject: [PATCH] Fixed wrong realpath() result for unexistent files on win32 --- TSRM/tsrm_virtual_cwd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 36bce0b5e9..33285bab09 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -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 -- 2.50.1