diff options
Diffstat (limited to 'TSRM')
| -rw-r--r-- | TSRM/TSRM.c | 2 | ||||
| -rw-r--r-- | TSRM/TSRM.h | 2 | ||||
| -rw-r--r-- | TSRM/tsrm_nw.c | 4 | ||||
| -rw-r--r-- | TSRM/tsrm_nw.h | 2 | ||||
| -rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 32 | ||||
| -rw-r--r-- | TSRM/tsrm_virtual_cwd.h | 4 | ||||
| -rw-r--r-- | TSRM/tsrm_win32.c | 4 | ||||
| -rw-r--r-- | TSRM/tsrm_win32.h | 4 |
8 files changed, 28 insertions, 26 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index fd6f56481..f1182e6f4 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Thread Safe Resource Manager | +----------------------------------------------------------------------+ - | Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski | + | Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski | | This source file is subject to the TSRM license, that is bundled | | with this package in the file LICENSE | +----------------------------------------------------------------------+ diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 558f3d07f..4a73c3487 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Thread Safe Resource Manager | +----------------------------------------------------------------------+ - | Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski | + | Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski | | This source file is subject to the TSRM license, that is bundled | | with this package in the file LICENSE | +----------------------------------------------------------------------+ diff --git a/TSRM/tsrm_nw.c b/TSRM/tsrm_nw.c index d12044c7f..435d7293d 100644 --- a/TSRM/tsrm_nw.c +++ b/TSRM/tsrm_nw.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_nw.c,v 1.8.2.1.2.1 2007/01/01 09:35:45 sebastian Exp $ */ +/* $Id: tsrm_nw.c,v 1.8.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */ #include <stdlib.h> #include <stdio.h> diff --git a/TSRM/tsrm_nw.h b/TSRM/tsrm_nw.h index 71acb408a..968d8a34a 100644 --- a/TSRM/tsrm_nw.h +++ b/TSRM/tsrm_nw.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 71c830fc9..a69d445cf 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.36 2007/10/23 05:57:35 dmitry Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.38 2007/12/31 07:20:02 sebastian Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -712,22 +712,24 @@ no_realpath: } ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok); } + free(free_path); + + if (use_realpath == CWD_REALPATH) { + if (ret) { + CWD_STATE_FREE(state); + *state = old_state; + return 1; + } + } else { #if defined(TSRM_WIN32) || defined(NETWARE) - if (path[path_length-1] == '\\' || path[path_length-1] == '/') { + if (path[path_length-1] == '\\' || path[path_length-1] == '/') { #else - if (path[path_length-1] == '/') { + if (path[path_length-1] == '/') { #endif - state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2); - state->cwd[state->cwd_length++] = DEFAULT_SLASH; - state->cwd[state->cwd_length] = 0; - } - - free(free_path); - - if ((use_realpath == CWD_REALPATH) && ret) { - CWD_STATE_FREE(state); - *state = old_state; - return 1; + state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2); + state->cwd[state->cwd_length++] = DEFAULT_SLASH; + state->cwd[state->cwd_length] = 0; + } } if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) { diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index 4ee77b7c1..aae37fae0 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8 2007/01/22 09:31:46 dmitry Exp $ */ +/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.9 2007/12/31 07:20:02 sebastian Exp $ */ #ifndef VIRTUAL_CWD_H #define VIRTUAL_CWD_H diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index eb5ae877a..804c809cc 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.c,v 1.27.2.1.2.7 2007/04/16 08:09:54 dmitry Exp $ */ +/* $Id: tsrm_win32.c,v 1.27.2.1.2.8 2007/12/31 07:20:02 sebastian Exp $ */ #include <stdio.h> #include <fcntl.h> diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index 1695b117e..757b97cb6 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.h,v 1.19.2.1.2.1 2007/01/01 09:35:45 sebastian Exp $ */ +/* $Id: tsrm_win32.h,v 1.19.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */ #ifndef TSRM_WIN32_H #define TSRM_WIN32_H |
